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:
@@ -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)
|
||||
}
|
||||
},
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user