mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Fix getting stuck in chapter loop when chapters have identical URLs
This commit is contained in:
parent
33e5fea96c
commit
b0106aa420
@ -15,7 +15,6 @@ class CategoryImpl : Category {
|
|||||||
if (other == null || javaClass != other.javaClass) return false
|
if (other == null || javaClass != other.javaClass) return false
|
||||||
|
|
||||||
val category = other as Category
|
val category = other as Category
|
||||||
|
|
||||||
return name == category.name
|
return name == category.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,10 +31,11 @@ class ChapterImpl : Chapter {
|
|||||||
if (other == null || javaClass != other.javaClass) return false
|
if (other == null || javaClass != other.javaClass) return false
|
||||||
|
|
||||||
val chapter = other as Chapter
|
val chapter = other as Chapter
|
||||||
return url == chapter.url
|
if (url != chapter.url) return false
|
||||||
|
return id == chapter.id
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return url.hashCode()
|
return url.hashCode() + id.hashCode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,11 +41,11 @@ open class MangaImpl : Manga {
|
|||||||
if (other == null || javaClass != other.javaClass) return false
|
if (other == null || javaClass != other.javaClass) return false
|
||||||
|
|
||||||
val manga = other as Manga
|
val manga = other as Manga
|
||||||
|
if (url != manga.url) return false
|
||||||
return url == manga.url
|
return id == manga.id
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return url.hashCode()
|
return url.hashCode() + id.hashCode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user