mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix same ids issue in library
This commit is contained in:
parent
db5e6f9216
commit
491915aa22
2 changed files with 4 additions and 2 deletions
|
@ -54,6 +54,6 @@ class LibraryHeaderItem(
|
|||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return -(category.id!!)
|
||||
return (category.id ?: 0L).hashCode()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,6 +181,8 @@ class LibraryItem(
|
|||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return (manga.id!! + (manga.category shl 50).toLong()).hashCode() // !!.hashCode()
|
||||
var result = manga.id!!.hashCode()
|
||||
result = 31 * result + (header?.hashCode() ?: 0)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue