mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 15:01:52 +01:00
Fix Incognito Mode toggle not updating after disabled via notification
This commit is contained in:
parent
3dbfee91f6
commit
52416ff3a8
@ -29,6 +29,8 @@ import eu.kanade.tachiyomi.util.preference.switchPreference
|
|||||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.system.openInBrowser
|
import eu.kanade.tachiyomi.util.system.openInBrowser
|
||||||
|
import kotlinx.coroutines.flow.launchIn
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.Subscription
|
import rx.Subscription
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
@ -70,6 +72,10 @@ class MoreController :
|
|||||||
iconRes = R.drawable.ic_glasses_24dp
|
iconRes = R.drawable.ic_glasses_24dp
|
||||||
iconTint = tintColor
|
iconTint = tintColor
|
||||||
defaultValue = false
|
defaultValue = false
|
||||||
|
|
||||||
|
preferences.incognitoMode().asFlow()
|
||||||
|
.onEach { isChecked = it }
|
||||||
|
.launchIn(viewScope)
|
||||||
}
|
}
|
||||||
|
|
||||||
preferenceCategory {
|
preferenceCategory {
|
||||||
|
Loading…
Reference in New Issue
Block a user