Change ThemeColorSet naming

pull/1577/head
bemusementpark 10 months ago
parent 80d08a5fb2
commit 90f6fee579

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

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

Loading…
Cancel
Save