|
@@ -7,9 +7,10 @@ import eu.kanade.tachiyomi.R
|
|
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
|
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
|
|
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
|
|
-import eu.kanade.tachiyomi.ui.base.controller.popControllerWithTag
|
|
|
import eu.kanade.tachiyomi.ui.source.global_search.GlobalSearchController
|
|
|
import eu.kanade.tachiyomi.ui.source.global_search.GlobalSearchPresenter
|
|
|
+import eu.kanade.tachiyomi.util.view.gone
|
|
|
+import eu.kanade.tachiyomi.util.view.visible
|
|
|
import uy.kohesive.injekt.injectLazy
|
|
|
|
|
|
class SearchController(
|
|
@@ -62,11 +63,9 @@ class SearchController(
|
|
|
|
|
|
fun renderIsReplacingManga(isReplacingManga: Boolean) {
|
|
|
if (isReplacingManga) {
|
|
|
- if (router.getControllerWithTag(LOADING_DIALOG_TAG) == null) {
|
|
|
- LoadingController().showDialog(router, LOADING_DIALOG_TAG)
|
|
|
- }
|
|
|
+ binding.progress.visible()
|
|
|
} else {
|
|
|
- router.popControllerWithTag(LOADING_DIALOG_TAG)
|
|
|
+ binding.progress.gone()
|
|
|
router.popController(this)
|
|
|
}
|
|
|
}
|
|
@@ -103,19 +102,4 @@ class SearchController(
|
|
|
.build()
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- class LoadingController : DialogController() {
|
|
|
-
|
|
|
- override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
|
|
- return MaterialDialog.Builder(activity!!)
|
|
|
- .progress(true, 0)
|
|
|
- .content(R.string.migrating)
|
|
|
- .cancelable(false)
|
|
|
- .build()
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- companion object {
|
|
|
- const val LOADING_DIALOG_TAG = "LoadingDialog"
|
|
|
- }
|
|
|
}
|