feat(duplicate-manga): Add target manga name in duplicate dialogs (#921)
This commit is contained in:
parent
382d29e303
commit
f8ef5d4cf2
6 changed files with 21 additions and 0 deletions
|
|
@ -155,6 +155,7 @@ private fun AddDuplicateMangaDialog(
|
|||
},
|
||||
onOpenManga = { navigator?.push(MangaScreen(it.id)) },
|
||||
onMigrate = { showMigrateDialog(dialog.manga, it) },
|
||||
targetManga = dialog.manga,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +207,7 @@ private fun BulkAllowDuplicateDialog(
|
|||
onConfirm = { addFavorite(dialog.currentIdx + 1) },
|
||||
onOpenManga = { navigator?.push(MangaScreen(it.id)) },
|
||||
onMigrate = { showMigrateDialog(dialog.manga, it) },
|
||||
targetManga = dialog.manga,
|
||||
bulkFavoriteManga = dialog.manga,
|
||||
onAllowAllDuplicate = { addFavoriteDuplicate(false) },
|
||||
onSkipAllDuplicate = { addFavoriteDuplicate(true) },
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ fun DuplicateMangaDialog(
|
|||
onMigrate: (manga: Manga) -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
// KMK -->
|
||||
targetManga: Manga,
|
||||
bulkFavoriteManga: Manga? = null,
|
||||
onAllowAllDuplicate: () -> Unit = {},
|
||||
onSkipAllDuplicate: () -> Unit = {},
|
||||
|
|
@ -128,6 +129,14 @@ fun DuplicateMangaDialog(
|
|||
.padding(top = MaterialTheme.padding.small),
|
||||
)
|
||||
|
||||
// KMK -->
|
||||
Text(
|
||||
text = targetManga.title,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
modifier = Modifier.then(horizontalPaddingModifier),
|
||||
)
|
||||
// KMK <--
|
||||
|
||||
Text(
|
||||
text = stringResource(MR.strings.possible_duplicates_summary),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
|
|
|||
|
|
@ -471,6 +471,9 @@ data class BrowseSourceScreen(
|
|||
onConfirm = { screenModel.addFavorite(dialog.manga) },
|
||||
onOpenManga = { navigator.push(MangaScreen(it.id)) },
|
||||
onMigrate = { screenModel.setDialog(BrowseSourceScreenModel.Dialog.Migrate(dialog.manga, it)) },
|
||||
// KMK -->
|
||||
targetManga = dialog.manga,
|
||||
// KMK <--
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@ data object HistoryTab : Tab {
|
|||
},
|
||||
onOpenManga = { navigator.push(MangaScreen(it.id)) },
|
||||
onMigrate = { screenModel.showMigrateDialog(dialog.manga, it) },
|
||||
// KMK -->
|
||||
targetManga = dialog.manga,
|
||||
// KMK <--
|
||||
)
|
||||
}
|
||||
is HistoryScreenModel.Dialog.ChangeCategory -> {
|
||||
|
|
|
|||
|
|
@ -472,6 +472,9 @@ class MangaScreen(
|
|||
onConfirm = { screenModel.toggleFavorite(onRemoved = {}, checkDuplicate = false) },
|
||||
onOpenManga = { navigator.push(MangaScreen(it.id)) },
|
||||
onMigrate = { screenModel.showMigrateDialog(it) },
|
||||
// KMK -->
|
||||
targetManga = dialog.manga,
|
||||
// KMK <--
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ class MangaDexFollowsScreen(private val sourceId: Long) : Screen() {
|
|||
onConfirm = { screenModel.addFavorite(dialog.manga) },
|
||||
onOpenManga = { navigator.push(MangaScreen(it.id)) },
|
||||
// KMK -->
|
||||
targetManga = dialog.manga,
|
||||
onMigrate = { screenModel.setDialog(BrowseSourceScreenModel.Dialog.Migrate(dialog.manga, it)) },
|
||||
// KMK <--
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue