From 90f6fee579fdd6dd0cfea6dba1ec52fb5eefb945 Mon Sep 17 00:00:00 2001 From: bemusementpark Date: Fri, 26 Jul 2024 21:49:55 +0930 Subject: [PATCH] Change ThemeColorSet naming --- .../org/thoughtcrime/securesms/ui/theme/ThemeColorSet.kt | 6 +++--- .../securesms/ui/theme/ThemeFromPreferences.kt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColorSet.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColorSet.kt index 59ea383063..a4b15e456b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColorSet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColorSet.kt @@ -5,8 +5,8 @@ package org.thoughtcrime.securesms.ui.theme * light theme, and [dark] representing the [ThemeColors] to use when the system is in a dark theme. */ data class ThemeColorSet( - val light: ThemeColors, - val dark: ThemeColors + val colorsWhenSystemInLight: ThemeColors, + val colorsWhenSystemInDark: ThemeColors ) { - fun get(isDark: Boolean): ThemeColors = if (isDark) dark else light + fun get(isDark: Boolean): ThemeColors = if (isDark) colorsWhenSystemInDark else colorsWhenSystemInLight } diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeFromPreferences.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeFromPreferences.kt index 130c370e26..d3e0927635 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeFromPreferences.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeFromPreferences.kt @@ -29,14 +29,14 @@ fun TextSecurePreferences.getColorSet(): ThemeColorSet { val followSystemSettings = getFollowSystemSettings() return if (followSystemSettings) ThemeColorSet( - light = createLight(selectedPrimary), - dark = createDark(selectedPrimary) + colorsWhenSystemInLight = createLight(selectedPrimary), + colorsWhenSystemInDark = createDark(selectedPrimary) ) else { val both = if ("light" in selectedTheme) createLight(selectedPrimary) else createDark(selectedPrimary) ThemeColorSet( - light = both, - dark = both + colorsWhenSystemInLight = both, + colorsWhenSystemInDark = both ) } }