diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt index b721aecbe..c8bf4f9ea 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt @@ -46,4 +46,15 @@ data class SourceItem( ) { holder.bind(this) } + + override fun equals(other: Any?): Boolean { + if (other is SourceItem) { + return source.id == other.source.id && getHeader()?.code == other.getHeader()?.code + } + return false + } + + override fun hashCode(): Int { + return source.id.hashCode() + (getHeader()?.code?.hashCode() ?: 0).toInt() + } }