Now totally fix migration list issues

This commit is contained in:
Jobobby04 2020-05-28 23:22:59 -04:00
parent 473bb69f70
commit bfdd39d4aa

View File

@ -80,7 +80,7 @@ class MigrationListController(bundle: Bundle? = null) :
private set
private var migratingManga: MutableList<MigratingManga>? = null
private var selectedPosition: Int? = null
private var manaulMigrations = 0
private var manualMigrations = 0
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
binding = MigrationListControllerBinding.inflate(inflater)
@ -326,7 +326,7 @@ class MigrationListController(bundle: Bundle? = null) :
if (res != null) {
activity?.toast(
res.getQuantityString(
R.plurals.manga_migrated, manaulMigrations, manaulMigrations
R.plurals.manga_migrated, manualMigrations, manualMigrations
)
)
}
@ -357,11 +357,11 @@ class MigrationListController(bundle: Bundle? = null) :
R.id.action_skip -> adapter?.removeManga(position)
R.id.action_migrate_now -> {
adapter?.migrateManga(position, false)
manaulMigrations++
manualMigrations++
}
R.id.action_copy_now -> {
adapter?.migrateManga(position, true)
manaulMigrations++
manualMigrations++
}
}
}
@ -486,7 +486,7 @@ class MigrationListController(bundle: Bundle? = null) :
menuCopy.icon.mutate()
menuMigrate.icon.mutate()
val tintColor = activity?.getResourceColor(R.attr.colorPrimary) ?: Color.WHITE
val tintColor = activity?.getResourceColor(R.attr.colorOnPrimary) ?: Color.WHITE
val translucentWhite = ColorUtils.setAlphaComponent(tintColor, 127)
menuCopy.icon?.setTint(if (allMangasDone) tintColor else translucentWhite)
menuMigrate?.icon?.setTint(if (allMangasDone) tintColor else translucentWhite)