From 7bb1a3a513035b8acb012a9717e611f46674fd08 Mon Sep 17 00:00:00 2001 From: bemusementpark Date: Mon, 29 Jul 2024 16:36:17 +0930 Subject: [PATCH] Suppress compose name warning --- .../thoughtcrime/securesms/ui/theme/MaybeFollowSystemColors.kt | 2 ++ app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/MaybeFollowSystemColors.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/MaybeFollowSystemColors.kt index fa0353a1e6..6bb0d3c2ad 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/MaybeFollowSystemColors.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/MaybeFollowSystemColors.kt @@ -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 } } +@Suppress("FunctionName") fun IgnoreSystemColors(colors: ThemeColors) = MaybeFollowSystemColors { colors } diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt index d1105ccbc1..ec19b3b100 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt @@ -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(),