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. * light theme, and [dark] representing the [ThemeColors] to use when the system is in a dark theme.
*/ */
data class ThemeColorSet( data class ThemeColorSet(
val light: ThemeColors, val colorsWhenSystemInLight: ThemeColors,
val dark: 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() val followSystemSettings = getFollowSystemSettings()
return if (followSystemSettings) ThemeColorSet( return if (followSystemSettings) ThemeColorSet(
light = createLight(selectedPrimary), colorsWhenSystemInLight = createLight(selectedPrimary),
dark = createDark(selectedPrimary) colorsWhenSystemInDark = createDark(selectedPrimary)
) else { ) else {
val both = if ("light" in selectedTheme) createLight(selectedPrimary) else createDark(selectedPrimary) val both = if ("light" in selectedTheme) createLight(selectedPrimary) else createDark(selectedPrimary)
ThemeColorSet( ThemeColorSet(
light = both, colorsWhenSystemInLight = both,
dark = both colorsWhenSystemInDark = both
) )
} }
} }