Skip to content

Commit

Permalink
fix: injected params in view models (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkesiSeli authored Dec 25, 2024
1 parent 0f436ba commit d2f2964
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class MultiCommunityScreen(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
override fun Content() {
val model: MultiCommunityMviModel = rememberScreenModel(communityId)
val model: MultiCommunityMviModel = rememberScreenModel(arg = communityId)
val uiState by model.uiState.collectAsState()
val topAppBarState = rememberTopAppBarState()
val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior(topAppBarState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MultiCommunityEditorScreen(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
override fun Content() {
val model: MultiCommunityEditorMviModel = rememberScreenModel(communityId)
val model: MultiCommunityEditorMviModel = rememberScreenModel(arg = communityId ?: 0)
val uiState by model.uiState.collectAsState()
val navigationCoordinator = remember { getNavigationCoordinator() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ReportListScreen(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
override fun Content() {
val model: ReportListMviModel = rememberScreenModel(communityId ?: 0L)
val model: ReportListMviModel = rememberScreenModel(arg = communityId ?: 0L)
val uiState by model.uiState.collectAsState()
val topAppBarState = rememberTopAppBarState()
val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior(topAppBarState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ZoomableImageScreen(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
override fun Content() {
val model: ZoomableImageMviModel = rememberScreenModel(url)
val model: ZoomableImageMviModel = rememberScreenModel(arg = url)
val uiState by model.uiState.collectAsState()
val snackbarHostState = remember { SnackbarHostState() }
val successMessage = LocalStrings.current.messageOperationSuccessful
Expand Down

0 comments on commit d2f2964

Please sign in to comment.