Fix getting stuck in chapter loop when chapters have identical URLs
(cherry picked from commit b0106aa4209317a5a2efd22a356d6aa75199c698)
This commit is contained in:
parent
f5b6fc5b54
commit
032504f128
@ -19,7 +19,6 @@ class CategoryImpl : Category {
|
||||
if (other == null || javaClass != other.javaClass) return false
|
||||
|
||||
val category = other as Category
|
||||
|
||||
return name == category.name
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,11 @@ class ChapterImpl : Chapter {
|
||||
if (other == null || javaClass != other.javaClass) return false
|
||||
|
||||
val chapter = other as Chapter
|
||||
return url == chapter.url
|
||||
if (url != chapter.url) return false
|
||||
return id == chapter.id
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return url.hashCode()
|
||||
return url.hashCode() + id.hashCode()
|
||||
}
|
||||
}
|
||||
|
@ -78,11 +78,11 @@ open class MangaImpl : Manga {
|
||||
if (other == null || javaClass != other.javaClass) return false
|
||||
|
||||
val manga = other as Manga
|
||||
|
||||
return url == manga.url
|
||||
if (url != manga.url) return false
|
||||
return id == manga.id
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return url.hashCode()
|
||||
return url.hashCode() + id.hashCode()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user