Ask to add an entry to the library before editing its cover (#2265)

Closes #2265

Co-authored-by: Quickdev <fyfrive@gmail.com>
This commit is contained in:
AntsyLich
2026-10-10 01:56:34 +06:00
parent 157679bba5
commit 0c1be369b0
4 changed files with 18 additions and 4 deletions
@@ -12,6 +12,7 @@ enum class DownloadAction {
enum class EditCoverAction {
EDIT,
DELETE,
ADD_TO_LIBRARY,
}
enum class MangaScreenItem {
@@ -65,6 +65,7 @@ import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.util.clickableNoIndication
import tachiyomi.source.local.isLocal
@Composable
fun MangaCoverDialog(
@@ -125,10 +126,12 @@ fun MangaCoverDialog(
var expanded by remember { mutableStateOf(false) }
IconButton(
onClick = {
if (isCustomCover) {
expanded = true
} else {
onEditClick(EditCoverAction.EDIT)
when {
!manga.favorite && !manga.isLocal() -> {
onEditClick(EditCoverAction.ADD_TO_LIBRARY)
}
isCustomCover -> expanded = true
else -> onEditClick(EditCoverAction.EDIT)
}
},
) {