Conversation
…chAndFilterActivity
…ng them dynamic - Hoisted navigation Logic into parent composable, FloatingBottomNav only dependency is list<Tabs>
Arkariang
commented
Jan 22, 2026
| private val viewModel: HomeScreenViewModel by viewModels { viewModelFactory } | ||
|
|
||
| // Search related VM's | ||
| private lateinit var searchVMFactory: SearchAndFilterViewModel.Factory |
Contributor
Author
There was a problem hiding this comment.
thinking on exploring the "Dependency Provider" Pattern on follow up tickets
data class HomeDependencies(
val searchVM: () -> SearchAndFilterViewModel,
val filterMenuVM: () -> FilterMenuViewModel,
val environment: Environment
)
were the dependencies class will be added to local composition
val LocalHomeDeps = staticCompositionLocalOf<HomeDependencies> {
error("No Dependencies provided")
}
aiming to avoid in the future overloading HomeActivity with tones of VM initialization and prop drilling them into the future navigation composables 🤔 .
For now this is good enough, but feel free to throw any ideas!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📲 What
SearchAndFilterto hold a parent composableThis parent composable is able to be loaded in HomeScreen as navigation destination as the same time as keeping it on
SearchAndFilteractivity.🤔 Why
🛠 How
👀 See
Screen_recording_20260121_165530.mp4
| | |
📋 QA
Story 📖
MBL-2793