Block merged manga from being able to be migrated
This commit is contained in:
parent
f4c6b2e09c
commit
b8e907cea2
@ -44,6 +44,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import exh.favorites.FavoritesIntroDialog
|
||||
import exh.favorites.FavoritesSyncStatus
|
||||
import exh.source.MERGED_SOURCE_ID
|
||||
import exh.source.PERV_EDEN_EN_SOURCE_ID
|
||||
import exh.source.PERV_EDEN_IT_SOURCE_ID
|
||||
import exh.source.isEhBasedManga
|
||||
@ -545,9 +546,13 @@ class LibraryController(
|
||||
// SY -->
|
||||
R.id.action_migrate -> {
|
||||
val skipPre = preferences.skipPreMigration().get()
|
||||
val selectedMangaIds = selectedMangas.mapNotNull { it.id }
|
||||
val selectedMangaIds = selectedMangas.filterNot { it.source == MERGED_SOURCE_ID }.mapNotNull { it.id }
|
||||
destroyActionModeIfNeeded()
|
||||
PreMigrationController.navigateToMigration(skipPre, router, selectedMangaIds)
|
||||
if (selectedMangaIds.isNotEmpty()) {
|
||||
PreMigrationController.navigateToMigration(skipPre, router, selectedMangaIds)
|
||||
} else {
|
||||
activity?.toast(R.string.no_valid_manga)
|
||||
}
|
||||
}
|
||||
R.id.action_clean -> cleanTitles()
|
||||
R.id.action_push_to_mdlist -> pushToMdList()
|
||||
|
@ -484,7 +484,7 @@ class MangaController :
|
||||
// Hide options for non-library manga
|
||||
menu.findItem(R.id.action_edit_categories).isVisible = presenter.manga.favorite && presenter.getCategories().isNotEmpty()
|
||||
menu.findItem(R.id.action_edit_cover).isVisible = /* SY --> */ false /* presenter.manga.favorite SY <-- */
|
||||
menu.findItem(R.id.action_migrate).isVisible = presenter.manga.favorite
|
||||
menu.findItem(R.id.action_migrate).isVisible = presenter.manga.favorite /* SY --> */ && presenter.manga.source != MERGED_SOURCE_ID /* SY <-- */
|
||||
|
||||
// SY -->
|
||||
menu.findItem(R.id.action_edit).isVisible = presenter.manga.favorite || isLocalSource
|
||||
|
@ -384,6 +384,9 @@
|
||||
</plurals>
|
||||
|
||||
<!-- Library -->
|
||||
<!-- Library Actions -->
|
||||
<string name="no_valid_manga">No valid manga selected</string>
|
||||
|
||||
<!-- Library Sheet -->
|
||||
<string name="tracked">Tracked</string>
|
||||
<string name="lewd">Lewd</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user