Skip to content

Commit

Permalink
release sora v3.7.0.0 107
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvi Fox committed Nov 9, 2023
1 parent 7e453b0 commit 4fe8a0b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,21 @@ class DarkThemeManager @Inject constructor(
}.flowOn(coroutineManager.main.immediate).stateIn(
scope = coroutineManager.applicationScope,
started = SharingStarted.Eagerly, // Eager mode is used to apply changes as soon as possible
initialValue = AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO
initialValue = AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES
)

fun updateUiModeFromCache() {
coroutineManager.applicationScope.launch {
mutableDarkThemeSharedFlow.emit(
value = DarkModeSettings(
// isSystemDrivenUiEnabled = soraPreferences.getBoolean(
// field = KEY_SYSTEM_DRIVEN_UI_ENABLED,
// defaultValue = false
// ),
isSystemDrivenUiEnabled = false,
// isDarkModeEnabled = soraPreferences.getBoolean(
// field = KEY_DARK_THEME_ENABLED,
// defaultValue = false
// )
isDarkModeEnabled = false,
isSystemDrivenUiEnabled = soraPreferences.getBoolean(
field = KEY_SYSTEM_DRIVEN_UI_ENABLED,
defaultValue = false
),
isDarkModeEnabled = soraPreferences.getBoolean(
field = KEY_DARK_THEME_ENABLED,
defaultValue = false
)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ fun SoraAppTheme(
content: @Composable () -> Unit,
) {
AppTheme(
darkTheme = false,
darkTheme = darkTheme,
lightColors = soraLightColors,
darkColors = soraLightColors,
darkColors = soraDarkColors,
typography = soraTypography,
borderRadius = soraBorderRadius,
content = content,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ internal fun AppSettingsScreen(
icon = null,
label = stringResource(id = R.string.system_appearance),
bottomDivider = false,
available = false,
checked = false,
available = true,
checked = checkedSystem,
onClick = onSystemToggle,
)
OptionSwitch(
icon = null,
label = stringResource(id = R.string.dark_mode),
bottomDivider = false,
available = false,
checked = false,
available = true,
checked = checkedDark,
onClick = onDarkToggle,
)
}
Expand Down

0 comments on commit 4fe8a0b

Please sign in to comment.