Fix source item flashing when pinning

This commit is contained in:
arkon 2020-07-26 17:09:56 -04:00
parent 52ae208df3
commit 26d5a87bef

View file

@ -46,4 +46,15 @@ data class SourceItem(
) { ) {
holder.bind(this) 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()
}
} }