Improve code.
This commit is contained in:
parent
8eaf355301
commit
92dfcc60ee
2 changed files with 1 additions and 7 deletions
|
|
@ -174,9 +174,6 @@ class RootFlowNode(
|
||||||
state = state,
|
state = state,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
onOpenBugReport = this::onOpenBugReport,
|
onOpenBugReport = this::onOpenBugReport,
|
||||||
announcementRenderer = { announcementModifier ->
|
|
||||||
announcementService.Render(announcementModifier)
|
|
||||||
}
|
|
||||||
) {
|
) {
|
||||||
val backstackSlider = rememberBackstackSlider<NavTarget>(
|
val backstackSlider = rememberBackstackSlider<NavTarget>(
|
||||||
transitionSpec = { spring(stiffness = Spring.StiffnessMediumLow) },
|
transitionSpec = { spring(stiffness = Spring.StiffnessMediumLow) },
|
||||||
|
|
@ -192,6 +189,7 @@ class RootFlowNode(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BackstackView(transitionHandler = transitionHandler)
|
BackstackView(transitionHandler = transitionHandler)
|
||||||
|
announcementService.Render(Modifier)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import io.element.android.services.apperror.impl.AppErrorView
|
||||||
fun RootView(
|
fun RootView(
|
||||||
state: RootState,
|
state: RootState,
|
||||||
onOpenBugReport: () -> Unit,
|
onOpenBugReport: () -> Unit,
|
||||||
announcementRenderer: @Composable (Modifier) -> Unit,
|
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
children: @Composable BoxScope.() -> Unit,
|
children: @Composable BoxScope.() -> Unit,
|
||||||
) {
|
) {
|
||||||
|
|
@ -44,8 +43,6 @@ fun RootView(
|
||||||
onOpenBugReport.invoke()
|
onOpenBugReport.invoke()
|
||||||
}
|
}
|
||||||
|
|
||||||
announcementRenderer(Modifier)
|
|
||||||
|
|
||||||
RageshakeDetectionView(
|
RageshakeDetectionView(
|
||||||
state = state.rageshakeDetectionState,
|
state = state.rageshakeDetectionState,
|
||||||
onOpenBugReport = ::onOpenBugReport,
|
onOpenBugReport = ::onOpenBugReport,
|
||||||
|
|
@ -66,7 +63,6 @@ internal fun RootViewPreview(@PreviewParameter(RootStateProvider::class) rootSta
|
||||||
RootView(
|
RootView(
|
||||||
state = rootState,
|
state = rootState,
|
||||||
onOpenBugReport = {},
|
onOpenBugReport = {},
|
||||||
announcementRenderer = { },
|
|
||||||
) {
|
) {
|
||||||
Text("Children")
|
Text("Children")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue