reset navbar colors on navigate

This commit is contained in:
Diogo
2024-09-04 13:53:41 +01:00
parent 7a92513b34
commit 3d9e032900
@@ -380,6 +380,24 @@ fun UserPicker(
)
}
LaunchedEffect(Unit) {
launch {
snapshotFlow { ModalManager.start.modalCount.value }
.collect { modalCount ->
val colors = CurrentColors.value.colors
if (modalCount == 0 && newChat.isVisible()) {
platform.androidSetDrawerStatusAndNavBarColor(
isLight = colors.isLight,
drawerShadingColor = animatedColor,
toolbarOnTop = !appPrefs.oneHandUI.get(),
navBarColor = colors.surface
)
}
}
}
}
LaunchedEffect(Unit) {
snapshotFlow { currentTheme }
.distinctUntilChanged()