mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore: Allow user to edit local manga without adding it to their library
This commit is contained in:
parent
951773053b
commit
8c409ff306
4 changed files with 8 additions and 7 deletions
|
@ -135,7 +135,7 @@ class EditMangaDialog : DialogController {
|
|||
.takeIf { it > -1 } ?: 0,
|
||||
)
|
||||
} else {
|
||||
if (manga.title != manga.originalTitle) {
|
||||
if (manga.title != manga.ogTitle) {
|
||||
binding.title.append(manga.title)
|
||||
}
|
||||
if (manga.author != manga.originalAuthor) {
|
||||
|
|
|
@ -1130,7 +1130,7 @@ class MangaDetailsController :
|
|||
private fun updateMenuVisibility(menu: Menu?) {
|
||||
menu ?: return
|
||||
val editItem = menu.findItem(R.id.action_edit)
|
||||
editItem?.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch
|
||||
editItem?.isVisible = (presenter.manga.favorite || presenter.manga.isLocal()) && !presenter.isLockedFromSearch
|
||||
menu.findItem(R.id.action_download)?.isVisible = !presenter.isLockedFromSearch &&
|
||||
!presenter.manga.isLocal()
|
||||
menu.findItem(R.id.action_mark_all_as_read)?.isVisible =
|
||||
|
|
|
@ -820,12 +820,12 @@ class MangaDetailsPresenter(
|
|||
updateManga.await(
|
||||
MangaUpdate(
|
||||
manga.id!!,
|
||||
title = manga.originalTitle,
|
||||
title = manga.ogTitle,
|
||||
author = manga.originalAuthor,
|
||||
artist = manga.originalArtist,
|
||||
description = manga.originalDescription,
|
||||
genres = manga.originalGenre?.split(", ").orEmpty(),
|
||||
status = manga.originalStatus,
|
||||
status = manga.ogStatus,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ class MangaDetailsPresenter(
|
|||
artist?.trimOrNull(),
|
||||
description?.trimOrNull(),
|
||||
genre?.joinToString(),
|
||||
if (status != this.manga.originalStatus) status else null,
|
||||
if (status != this.manga.ogStatus) status else null,
|
||||
)
|
||||
launchNow {
|
||||
customMangaManager.saveMangaInfo(manga)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue