RemoveMangaDialog: Show manga title in dialog message (#8163)

(cherry picked from commit 737d0fb8f3d87ab7a9d5ff4319d629dbe5213b96)
This commit is contained in:
zbue 2022-10-09 22:56:31 +08:00 committed by Jobobby04
parent ae7c720d6c
commit 86b333384f
3 changed files with 6 additions and 3 deletions

View File

@ -1,16 +1,18 @@
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.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,
@ -33,7 +35,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))
},
)
}

View File

@ -162,6 +162,7 @@ open class BrowseSourceController(bundle: Bundle) :
onConfirm = {
presenter.changeMangaFavorite(dialog.manga)
},
mangaToRemove = dialog.manga,
)
}
is Dialog.ChangeMangaCategory -> {

View File

@ -876,5 +876,5 @@
<!-- App widget -->
<string name="appwidget_updates_description">See your recently updated manga</string>
<string name="appwidget_unavailable_locked">Widget not available when app lock is enabled</string>
<string name="remove_manga">You are about to remove this manga from your library</string>
<string name="remove_manga">You are about to remove \"%s\" from your library</string>
</resources>