Mass Migration now shows progress and total manga in the title
(cherry picked from commit 68c3d28b4bc7b5cc4038648d5f187fe4da9a42a9)
This commit is contained in:
parent
2e0102d689
commit
3d0dc64de1
@ -78,7 +78,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
}
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return resources?.getString(R.string.migration)
|
||||
return resources?.getString(R.string.migration) + " (${adapter?.items?.count { it.manga
|
||||
.migrationStatus != MigrationStatus.RUNNUNG }}/${adapter?.itemCount ?: 0})"
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View) {
|
||||
@ -243,6 +244,12 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateCount() {
|
||||
launchUI {
|
||||
setTitle()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
|
||||
|
@ -36,9 +36,11 @@ class MigrationProcessAdapter(
|
||||
fun enableButtons()
|
||||
fun removeManga(item: MigrationProcessItem)
|
||||
fun noMigration()
|
||||
fun updateCount()
|
||||
}
|
||||
|
||||
fun sourceFinished() {
|
||||
menuItemListener.updateCount()
|
||||
if (itemCount == 0) menuItemListener.noMigration()
|
||||
if (allMangasDone()) menuItemListener.enableButtons()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user