-
Notifications
You must be signed in to change notification settings - Fork 3
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/sub categorys #195
Feat/sub categorys #195
Conversation
testomania/src/main/java/com/earth/testomania/home_screen/presentation/AboutBottomSheet.kt
Outdated
Show resolved
Hide resolved
testomania/src/main/java/com/earth/testomania/technical/data/repository/QuizRepositoryImpl.kt
Outdated
Show resolved
Hide resolved
testomania/src/main/java/com/earth/testomania/technical/data/source/remote/QuizApi.kt
Outdated
Show resolved
Hide resolved
testomania/src/main/java/com/earth/testomania/technical/domain/repository/QuizRepository.kt
Show resolved
Hide resolved
@EntryPoint | ||
@InstallIn(ActivityComponent::class) | ||
interface ViewModelFactoryProvider { | ||
fun quizViewModelFactory(): QuizViewModel.Factory |
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.
why not just pass bundle arguments to the next screen?
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 need QuizCategory at the viewModel initialization, thats why I made this factory
testomania/src/main/java/com/earth/testomania/home_screen/presentation/AboutBottomSheet.kt
Show resolved
Hide resolved
scope.launch { | ||
modalBottomSheetState.snapTo(ModalBottomSheetValue.Hidden) | ||
//snapTo is quicker then hide | ||
}.invokeOnCompletion { |
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.
why not have navigator?.navigate(TechnicalTestsScreenDestination(quizCategory))
inside launch {} ?
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.
it's a bug fix by @Nodrex as I guess, the bottomSheet stays on screen otherwise
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.
Yes, @kdiakonidze is right, I fixed bottomSheet stays on screen
Bug with this solution.
If you @shalva97 have better solution please suggest
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.
as I check it works without "invokeOnCompletion" block. just calling navigation after bottomSheet hide method in launch block. Any objections on that @Nodrex ?
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.
It did not always worked for me
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.
ok, lets stay on solution by Nodar
No description provided.