Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b01813 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not dedupe theme updates when seedColor is pulled from context" into main

parents 9d037e36 168482c5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -48,7 +48,13 @@ interface ClockFaceController {
    companion object {
        fun ClockFaceController.updateTheme(mutateTheme: (ThemeConfig) -> ThemeConfig) {
            val theme = mutateTheme(this.theme)
            if (this.theme == theme) return

            // Themes with null seeds are always considered to have changed since we don't know
            // at this point if the context's color theme has been updated externally.
            // TODO(b/364680879): Capture context's color and compare when applicable.
            val hasChanged = this.theme != theme || theme.seedColor == null
            if (!hasChanged) return

            events.onThemeChanged(theme)
            this.theme = theme
        }