mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
chore(globalsearch): Save initial mangaId just in case
This commit is contained in:
parent
8ec29bf755
commit
50cad86c0c
1 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,7 @@ class GlobalSearchMangaItem(
|
|||
|
||||
private val getManga: GetManga by injectLazy()
|
||||
|
||||
val mangaId: Long? = initialManga.id
|
||||
var manga: Manga = initialManga
|
||||
private set
|
||||
// TODO: Could potentially cause memleak, test it with leakcanary before deploying to stable!
|
||||
|
@ -62,12 +63,12 @@ class GlobalSearchMangaItem(
|
|||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other is GlobalSearchMangaItem) {
|
||||
return manga.id == other.manga.id
|
||||
return mangaId == other.mangaId
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return manga.id?.toInt() ?: 0
|
||||
return mangaId?.toInt() ?: 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue