Change ThemeColorSet naming

This commit is contained in:
bemusementpark 2024-07-26 21:49:55 +09:30
parent 80d08a5fb2
commit 90f6fee579
2 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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
)
}
}