This commit is contained in:
Jays2Kings 2021-07-02 22:30:16 -04:00
parent 2dc61cb070
commit 97519884b6
2 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,8 @@ open class MangaImpl : Manga {
set(value) { ogGenre = value }
override var status: Int
get() = if (favorite) customMangaManager.getManga(this)?.status ?: ogStatus else ogStatus
get() = if (favorite) customMangaManager.getManga(this)?.status.takeIf { it != -1 }
?: ogStatus else ogStatus
set(value) { ogStatus = value }
override var thumbnail_url: String? = null

View File

@ -56,7 +56,9 @@ class CustomMangaManager(val context: Context) {
}
fun saveMangaInfo(manga: MangaJson) {
if (manga.title == null && manga.author == null && manga.artist == null && manga.description == null && manga.genre == null && manga.status == null) {
if (manga.title == null && manga.author == null && manga.artist == null
&& manga.description == null && manga.genre == null
&& (manga.status == null || manga.status == -1)) {
customMangaMap.remove(manga.id)
} else {
customMangaMap[manga.id] = MangaImpl().apply {