Suppress compose name warning

This commit is contained in:
bemusementpark 2024-07-29 16:36:17 +09:30
parent 25e7c7ec61
commit 7bb1a3a513
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ fun interface MaybeFollowSystemColors {
fun get(): ThemeColors fun get(): ThemeColors
} }
@Suppress("FunctionName")
fun FollowSystemColors(light: ThemeColors, dark: ThemeColors) = MaybeFollowSystemColors { fun FollowSystemColors(light: ThemeColors, dark: ThemeColors) = MaybeFollowSystemColors {
when { when {
isSystemInDarkTheme() -> dark isSystemInDarkTheme() -> dark
@ -15,4 +16,5 @@ fun FollowSystemColors(light: ThemeColors, dark: ThemeColors) = MaybeFollowSyste
} }
} }
@Suppress("FunctionName")
fun IgnoreSystemColors(colors: ThemeColors) = MaybeFollowSystemColors { colors } fun IgnoreSystemColors(colors: ThemeColors) = MaybeFollowSystemColors { colors }

View File

@ -32,7 +32,7 @@ fun SessionMaterialTheme(
val context = LocalContext.current val context = LocalContext.current
val preferences = AppTextSecurePreferences(context) val preferences = AppTextSecurePreferences(context)
val jjcachedColors = cachedColors ?: preferences.colors.also { cachedColors = it } val cachedColors = cachedColors ?: preferences.colors.also { cachedColors = it }
SessionMaterialTheme( SessionMaterialTheme(
colors = cachedColors.get(), colors = cachedColors.get(),