mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Mass Migration now shows progress and total manga in the title
(cherry picked from commit 68c3d28b4bc7b5cc4038648d5f187fe4da9a42a9)
This commit is contained in:
		| @@ -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() | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user