mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-29 01:03:16 +00:00
status and nav bar colors
This commit is contained in:
1 parent
8a3e923822
commit
3f8d38da23
7 files changed
+25
-23
No files matched your search
-8
@@ -38,14 +38,6 @@ actual fun SimpleAndAnimatedImageView(
|
||||
if (getLoadedFilePath(file) != null) {
|
||||
ModalManager.fullscreen.showCustomModal(animated = false) { close ->
|
||||
ImageFullScreenView(imageProvider, close)
|
||||
if (smallView) {
|
||||
DisposableEffect(Unit) {
|
||||
onDispose {
|
||||
val c = CurrentColors.value.colors
|
||||
platform.androidSetStatusAndNavigationBarAppearance(c.isLight)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -75,9 +75,9 @@ private fun GreenLine(statusBarHeight: Dp, call: Call) {
|
||||
CallDuration(call)
|
||||
}
|
||||
DisposableEffect(Unit) {
|
||||
platform.androidSetStatusAndNavigationBarAppearance(false)
|
||||
platform.androidSetStatusAndNavigationBarAppearance(false, CurrentColors.value.colors.isLight)
|
||||
onDispose {
|
||||
platform.androidSetStatusAndNavigationBarAppearance(CurrentColors.value.colors.isLight)
|
||||
platform.androidSetStatusAndNavigationBarAppearance(CurrentColors.value.colors.isLight, CurrentColors.value.colors.isLight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ interface PlatformInterface {
|
||||
fun androidChatInitializedAndStarted() {}
|
||||
fun androidIsBackgroundCallAllowed(): Boolean = true
|
||||
fun androidSetNightModeIfSupported() {}
|
||||
fun androidSetStatusAndNavigationBarAppearance(isLight: Boolean) {}
|
||||
fun androidSetStatusAndNavigationBarAppearance(isLightStatusBar: Boolean, isLightNavBar: Boolean) {}
|
||||
fun androidStartCallActivity(acceptCall: Boolean, remoteHostId: Long? = null, chatId: ChatId? = null) {}
|
||||
fun androidPictureInPictureAllowed(): Boolean = true
|
||||
fun androidCallEnded() {}
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ object ThemeManager {
|
||||
CurrentColors.value = currentColors(null, null, chatModel.currentUser.value?.uiThemes, appPrefs.themeOverrides.get())
|
||||
platform.androidSetNightModeIfSupported()
|
||||
val c = CurrentColors.value.colors
|
||||
platform.androidSetStatusAndNavigationBarAppearance(c.isLight)
|
||||
platform.androidSetStatusAndNavigationBarAppearance(c.isLight, c.isLight)
|
||||
}
|
||||
|
||||
fun changeDarkTheme(theme: String) {
|
||||
|
||||
+8
-2
@@ -56,8 +56,14 @@ fun ImageFullScreenView(imageProvider: () -> ImageGalleryProvider, close: () ->
|
||||
val scope = rememberCoroutineScope()
|
||||
val playersToRelease = rememberSaveable { mutableSetOf<URI>() }
|
||||
DisposableEffectOnGone(
|
||||
always = { platform.androidSetStatusAndNavigationBarAppearance(CurrentColors.value.colors.isLight) },
|
||||
whenGone = { playersToRelease.forEach { VideoPlayerHolder.release(it, true, true) } }
|
||||
always = { platform.androidSetStatusAndNavigationBarAppearance(false, false) },
|
||||
whenDispose = {
|
||||
val c = CurrentColors.value.colors
|
||||
platform.androidSetStatusAndNavigationBarAppearance(c.isLight, c.isLight)
|
||||
},
|
||||
whenGone = {
|
||||
playersToRelease.forEach { VideoPlayerHolder.release(it, true, true) }
|
||||
}
|
||||
)
|
||||
|
||||
@Composable
|
||||
|
||||
Reference in new issue
Block a user