Custom color schemes v2 - part 3

Store preferences and apply color schemes
This commit is contained in:
MM20
2023-08-23 19:02:37 +02:00
parent f128469f68
commit 1a86aa018e
15 changed files with 93 additions and 1506 deletions
@@ -44,7 +44,8 @@ class ThemeRepository(
}
}
fun getThemeOrDefault(id: UUID): Flow<Theme> {
fun getThemeOrDefault(id: UUID?): Flow<Theme> {
if (id == null) return flowOf(getDefaultTheme())
return getTheme(id).map { it ?: getDefaultTheme() }
}