Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move to folder [WPB-14627] #3787

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

feat: move to folder [WPB-14627] #3787

wants to merge 16 commits into from

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Jan 7, 2025

TaskWPB-14627 [Android] Conversation folder - Move to folder


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

  • move conversation to folder screen
  • conversation bottom sheet option to move conversation to folder from conversation list and from conversation details screen (for other user profile screen is currently disable, will need additional work on kalium to get conversation details)
  • snackbars with information about success and failure

Attachments (Optional)

screen-20250107-095349.mp4

@Garzas Garzas self-assigned this Jan 7, 2025
@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Jan 7, 2025
@Garzas Garzas marked this pull request as ready for review January 7, 2025 12:21
}

@Composable
private fun Content(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I would prefer to have "content" composables without injections nor viewmodels so that previews can be created more easier, would it be complicated to move these viewmodel injections up to the ConversationFoldersScreen? 🤔

Comment on lines +71 to +75
val args = remember {
navigator.navController.currentBackStackEntry?.let {
ConversationFoldersScreenDestination.argsFrom(it)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: for destination composables you can get args more easily by just adding it as a parameter:

@Composable
fun ConversationFoldersScreen(
    args: ConversationFoldersNavArgs,
    navigator: Navigator,
    resultNavigator: ResultBackNavigator<ConversationFoldersNavBackArgs>,
)

val resources = LocalContext.current.resources
val context = LocalContext.current

LaunchedEffect(Unit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use lifecycle.repeatOnLifecycle() here to collect only when app is in foreground?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is unnecessary because even if user goes to background after triggering action it should close select folder screen either way

private val moveConversationToFolder: MoveConversationToFolderUseCase,
) : MoveConversationToFolderVM, ViewModel() {

var state: MoveConversationToFolderState by mutableStateOf(MoveConversationToFolderState())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be private? Or keep it public with private get() and then actionableState() is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, nice catch 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants