File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
app/src/main/java/app/revanced/manager Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ import androidx.lifecycle.ViewModel
44import androidx.lifecycle.viewModelScope
55import app.revanced.manager.domain.manager.PreferencesManager
66import app.revanced.manager.ui.theme.Theme
7+ import app.revanced.manager.util.resetListItemColorsCached
78import kotlinx.coroutines.launch
89
910class GeneralSettingsViewModel (
1011 val prefs : PreferencesManager
1112) : ViewModel() {
1213 fun setTheme (theme : Theme ) = viewModelScope.launch {
1314 prefs.theme.update(theme)
15+ resetListItemColorsCached()
1416 }
1517}
Original file line number Diff line number Diff line change @@ -180,6 +180,10 @@ fun LocalDateTime.relativeTime(context: Context): String {
180180
181181private var transparentListItemColorsCached: ListItemColors ? = null
182182
183+ fun resetListItemColorsCached () {
184+ transparentListItemColorsCached = null
185+ }
186+
183187/* *
184188 * The default ListItem colors, but with [ListItemColors.containerColor] set to [Color.Transparent].
185189 */
You can’t perform that action at this time.
0 commit comments