From 737d0fb8f3d87ab7a9d5ff4319d629dbe5213b96 Mon Sep 17 00:00:00 2001 From: zbue <108109611+zbue@users.noreply.github.com> Date: Sun, 9 Oct 2022 22:56:31 +0800 Subject: [PATCH] RemoveMangaDialog: Show manga title in dialog message (#8163) --- .../presentation/browse/components/BrowseSourceDialogs.kt | 6 ++++-- .../ui/browse/source/browse/BrowseSourceController.kt | 1 + i18n/src/main/res/values/strings.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceDialogs.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceDialogs.kt index 1479ee08f..6a1d7d5d3 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceDialogs.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceDialogs.kt @@ -1,18 +1,20 @@ package eu.kanade.presentation.browse.components -import androidx.compose.material.TextButton import androidx.compose.material3.AlertDialog import androidx.compose.material3.Text +import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue import androidx.compose.ui.res.stringResource +import eu.kanade.domain.manga.model.Manga import eu.kanade.tachiyomi.R @Composable fun RemoveMangaDialog( onDismissRequest: () -> Unit, onConfirm: () -> Unit, + mangaToRemove: Manga, ) { AlertDialog( onDismissRequest = onDismissRequest, @@ -35,7 +37,7 @@ fun RemoveMangaDialog( Text(text = stringResource(R.string.are_you_sure)) }, text = { - Text(text = stringResource(R.string.remove_manga)) + Text(text = stringResource(R.string.remove_manga, mangaToRemove.title)) }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index b5ae6bff3..283390a75 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -91,6 +91,7 @@ open class BrowseSourceController(bundle: Bundle) : onConfirm = { presenter.changeMangaFavorite(dialog.manga) }, + mangaToRemove = dialog.manga, ) } is Dialog.ChangeMangaCategory -> { diff --git a/i18n/src/main/res/values/strings.xml b/i18n/src/main/res/values/strings.xml index c8ae4d7fb..199e7b843 100644 --- a/i18n/src/main/res/values/strings.xml +++ b/i18n/src/main/res/values/strings.xml @@ -876,5 +876,5 @@ See your recently updated manga Widget not available when app lock is enabled - You are about to remove this manga from your library + You are about to remove \"%s\" from your library