Fix source item flashing when pinning
This commit is contained in:
parent
52ae208df3
commit
26d5a87bef
1 changed files with 11 additions and 0 deletions
|
@ -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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue