Fix crash with open in webview after migrate
This commit is contained in:
parent
698246ee2a
commit
0c3e8f977c
@ -12,8 +12,6 @@ open class MangaImpl : Manga {
|
||||
override lateinit var url: String
|
||||
|
||||
// SY -->
|
||||
private val customMangaManager: CustomMangaManager by injectLazy()
|
||||
|
||||
override var title: String
|
||||
get() = if (favorite) {
|
||||
val customTitle = customMangaManager.getManga(this)?.title
|
||||
@ -93,4 +91,10 @@ open class MangaImpl : Manga {
|
||||
override fun hashCode(): Int {
|
||||
return url.hashCode() + id.hashCode()
|
||||
}
|
||||
|
||||
// SY -->
|
||||
companion object {
|
||||
private val customMangaManager: CustomMangaManager by injectLazy()
|
||||
}
|
||||
// SY <--
|
||||
}
|
||||
|
@ -36,7 +36,14 @@ 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
|
||||
) {
|
||||
customMangaMap.remove(manga.id!!)
|
||||
} else {
|
||||
customMangaMap[manga.id!!] = manga.toManga()
|
||||
|
Loading…
x
Reference in New Issue
Block a user