@ -8,6 +8,7 @@ fun interface MaybeFollowSystemColors {
fun get(): ThemeColors
}
@Suppress("FunctionName")
fun FollowSystemColors(light: ThemeColors, dark: ThemeColors) = MaybeFollowSystemColors {
when {
isSystemInDarkTheme() -> dark
@ -15,4 +16,5 @@ fun FollowSystemColors(light: ThemeColors, dark: ThemeColors) = MaybeFollowSyste
fun IgnoreSystemColors(colors: ThemeColors) = MaybeFollowSystemColors { colors }
@ -32,7 +32,7 @@ fun SessionMaterialTheme(
val context = LocalContext.current
val preferences = AppTextSecurePreferences(context)
val jjcachedColors = cachedColors ?: preferences.colors.also { cachedColors = it }
val cachedColors = cachedColors ?: preferences.colors.also { cachedColors = it }
SessionMaterialTheme(
colors = cachedColors.get(),