mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 02:49:18 +01:00
Remove migrating progress dialog
This commit is contained in:
parent
b17762f8d9
commit
2485ef8547
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -13,4 +13,24 @@
|
||||
android:paddingBottom="4dp"
|
||||
tools:listitem="@layout/global_search_controller_card" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:alpha="0.75" />
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
@ -526,7 +526,6 @@
|
||||
<string name="select">Select</string>
|
||||
<string name="migrate">Migrate</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="migrating">Migrating…</string>
|
||||
|
||||
<!-- Downloads activity and service -->
|
||||
<string name="download_queue_error">Could not download chapters. You can try again in the downloads section</string>
|
||||
|
Loading…
Reference in New Issue
Block a user