mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Remove migrating progress dialog
This commit is contained in:
parent
b17762f8d9
commit
2485ef8547
3 changed files with 24 additions and 21 deletions
|
@ -7,9 +7,10 @@ import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
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.GlobalSearchController
|
||||||
import eu.kanade.tachiyomi.ui.source.global_search.GlobalSearchPresenter
|
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
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
|
||||||
class SearchController(
|
class SearchController(
|
||||||
|
@ -62,11 +63,9 @@ class SearchController(
|
||||||
|
|
||||||
fun renderIsReplacingManga(isReplacingManga: Boolean) {
|
fun renderIsReplacingManga(isReplacingManga: Boolean) {
|
||||||
if (isReplacingManga) {
|
if (isReplacingManga) {
|
||||||
if (router.getControllerWithTag(LOADING_DIALOG_TAG) == null) {
|
binding.progress.visible()
|
||||||
LoadingController().showDialog(router, LOADING_DIALOG_TAG)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
router.popControllerWithTag(LOADING_DIALOG_TAG)
|
binding.progress.gone()
|
||||||
router.popController(this)
|
router.popController(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,19 +102,4 @@ class SearchController(
|
||||||
.build()
|
.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"
|
android:paddingBottom="4dp"
|
||||||
tools:listitem="@layout/global_search_controller_card" />
|
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>
|
</FrameLayout>
|
||||||
|
|
|
@ -526,7 +526,6 @@
|
||||||
<string name="select">Select</string>
|
<string name="select">Select</string>
|
||||||
<string name="migrate">Migrate</string>
|
<string name="migrate">Migrate</string>
|
||||||
<string name="copy">Copy</string>
|
<string name="copy">Copy</string>
|
||||||
<string name="migrating">Migrating…</string>
|
|
||||||
|
|
||||||
<!-- Downloads activity and service -->
|
<!-- Downloads activity and service -->
|
||||||
<string name="download_queue_error">Could not download chapters. You can try again in the downloads section</string>
|
<string name="download_queue_error">Could not download chapters. You can try again in the downloads section</string>
|
||||||
|
|
Loading…
Reference in a new issue