From 6cfd2c510b9ee15bc393db44ad4adce0dfc5c915 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 24 Nov 2021 17:34:39 -0500 Subject: [PATCH] Fix crash in clear database screen (fixes #6271) --- .../tachiyomi/ui/setting/database/ClearDatabasePresenter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabasePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabasePresenter.kt index 05dafd73c0..d209779a3b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabasePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabasePresenter.kt @@ -5,6 +5,7 @@ import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter import rx.Observable +import rx.android.schedulers.AndroidSchedulers import rx.schedulers.Schedulers import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get @@ -19,6 +20,7 @@ class ClearDatabasePresenter : BasePresenter() { super.onCreate(savedState) getDatabaseSourcesObservable() .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) .subscribeLatestCache(ClearDatabaseController::setItems) }