|
@@ -10,8 +10,6 @@ import android.os.Bundle
|
|
|
import android.provider.Settings
|
|
|
import androidx.preference.PreferenceScreen
|
|
|
import com.afollestad.materialdialogs.MaterialDialog
|
|
|
-import com.bluelinelabs.conductor.RouterTransaction
|
|
|
-import com.bluelinelabs.conductor.changehandler.FadeChangeHandler
|
|
|
import eu.kanade.tachiyomi.R
|
|
|
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
|
|
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
|
@@ -20,7 +18,6 @@ import eu.kanade.tachiyomi.data.library.LibraryUpdateService.Target
|
|
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
|
|
import eu.kanade.tachiyomi.network.NetworkHelper
|
|
|
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
|
|
-import eu.kanade.tachiyomi.ui.library.LibraryController
|
|
|
import eu.kanade.tachiyomi.util.preference.defaultValue
|
|
|
import eu.kanade.tachiyomi.util.preference.onClick
|
|
|
import eu.kanade.tachiyomi.util.preference.preference
|
|
@@ -173,12 +170,6 @@ class SettingsAdvancedController : SettingsController() {
|
|
|
}
|
|
|
|
|
|
private fun clearDatabase() {
|
|
|
- // Avoid weird behavior by going back to the library.
|
|
|
- val newBackstack = listOf(RouterTransaction.with(LibraryController())) +
|
|
|
- router.backstack.drop(1)
|
|
|
-
|
|
|
- router.setBackstack(newBackstack, FadeChangeHandler())
|
|
|
-
|
|
|
db.deleteMangasNotInLibrary().executeAsBlocking()
|
|
|
db.deleteHistoryNoLastRead().executeAsBlocking()
|
|
|
activity?.toast(R.string.clear_database_completed)
|