Change ThemeColorSet naming

pull/1577/head
bemusementpark 9 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.
*/
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
}

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

Loading…
Cancel
Save