mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Change ThemeColorSet naming
This commit is contained in:
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…
x
Reference in New Issue
Block a user