Fix source item flashing when pinning

(cherry picked from commit 26d5a87bef203292cba265609b9ce10aa3e7db85)
This commit is contained in:
arkon 2020-07-26 17:09:56 -04:00 committed by Jobobby04
parent 0556c5c2ff
commit a13166b69d

View File

@ -49,4 +49,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()
}
}