Fix same ids issue in library

This commit is contained in:
Jays2Kings 2021-05-06 17:56:00 -04:00
parent db5e6f9216
commit 491915aa22
2 changed files with 4 additions and 2 deletions

View File

@ -54,6 +54,6 @@ class LibraryHeaderItem(
} }
override fun hashCode(): Int { override fun hashCode(): Int {
return -(category.id!!) return (category.id ?: 0L).hashCode()
} }
} }

View File

@ -181,6 +181,8 @@ class LibraryItem(
} }
override fun hashCode(): Int { 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
} }
} }