This commit is contained in:
Moez Bhatti
2020-01-12 02:05:04 -05:00
parent abd198db81
commit 57ce854f18
@@ -90,8 +90,8 @@ class Colors @Inject constructor(
fun themeObservable(recipient: Recipient? = null): Observable<Theme> { fun themeObservable(recipient: Recipient? = null): Observable<Theme> {
val pref = when { val pref = when {
recipient == null -> prefs.theme() recipient == null -> prefs.theme()
prefs.autoColor.get() -> prefs.theme(recipient.id, prefs.theme().get()) prefs.autoColor.get() -> prefs.theme(recipient.id, generateColor(recipient))
else -> prefs.theme(recipient.id, generateColor(recipient)) else -> prefs.theme(recipient.id, prefs.theme().get())
} }
return pref.asObservable() return pref.asObservable()
.map { color -> Theme(color, this) } .map { color -> Theme(color, this) }