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

♻️ Update Enable transition from session details to the search screen. #799

Merged
merged 4 commits into from
Sep 30, 2022

Conversation

Corvus400
Copy link
Contributor

Issue

  • Nothing.

Overview (Required)

  • Tapping a category tag now takes you to the search screen.
  • When the search screen is displayed, the search will already be performed using the tag displayed in the session details.

Links

  • Nothing.

Movie

before.mp4
after.mp4

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 29, 2022 09:06 Inactive
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 29, 2022 10:27 Inactive
@@ -99,6 +100,10 @@ fun SearchRoot(

val keyboardController = LocalSoftwareKeyboardController.current

if (categoryId != null) {
viewModel.onCategorySelected(categoryId)
Copy link
Member

Choose a reason for hiding this comment

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

I think we shouldn't call viewModel moethod in Composable function directly. 👀
So how about using LaunchedEffect?

LaunchedEffect(initialCategoryId) {
viewModel.onCategorySelected(categoryId)
}

viewModel.onCategorySelected(categoryId)
LaunchedEffect(categoryId) {
if (categoryId != null) {
viewModel.onCategorySelected(categoryId)
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, can we use initialCategoryId instead of categoryId? Because it is used only for the initial state.

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 29, 2022 16:23 Inactive
@takahirom
Copy link
Member

Thanks! LGTM!

@takahirom takahirom merged commit d3b56ed into DroidKaigi:main Sep 30, 2022
@Corvus400 Corvus400 deleted the feature/update_session_detail branch September 30, 2022 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants