Allow MigratePreferences to run completley async

This commit is contained in:
Moez Bhatti
2018-09-22 00:27:42 -04:00
parent 3d90dd2865
commit 86db66b70b
@@ -36,7 +36,7 @@ class MigratePreferences @Inject constructor(
) : Interactor<Unit>() {
override fun buildObservable(params: Unit): Flowable<*> {
return Flowable.just(rxPrefs.getBoolean("pref_key_welcome_seen", false))
return Flowable.fromCallable { rxPrefs.getBoolean("pref_key_welcome_seen", false) }
.filter { seen -> seen.get() } // Only proceed if this value is true. It will be set false at the end
.doOnNext {
// Theme