diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt index c78cdce964..cf665bf2c4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt @@ -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" - } } diff --git a/app/src/main/res/layout/global_search_controller.xml b/app/src/main/res/layout/global_search_controller.xml index 6d321b8d03..ae380eb4b0 100644 --- a/app/src/main/res/layout/global_search_controller.xml +++ b/app/src/main/res/layout/global_search_controller.xml @@ -13,4 +13,24 @@ android:paddingBottom="4dp" tools:listitem="@layout/global_search_controller_card" /> + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8b1f69d7e8..8a85f65d0d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -526,7 +526,6 @@ Select Migrate Copy - Migrating… Could not download chapters. You can try again in the downloads section