-
Notifications
You must be signed in to change notification settings - Fork 28
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
base: develop
Are you sure you want to change the base?
Conversation
} | ||
|
||
@Composable | ||
private fun Content( |
There was a problem hiding this comment.
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
? 🤔
val args = remember { | ||
navigator.navController.currentBackStackEntry?.let { | ||
ConversationFoldersScreenDestination.argsFrom(it) | ||
} | ||
} |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, nice catch 👏
Quality Gate passedIssues Measures |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Attachments (Optional)
screen-20250107-095349.mp4