Use DiffUtil at conversations screen

This commit is contained in:
Naveen 2022-11-13 00:38:11 +05:30
parent 3092253022
commit 9bdc8b6f7e
3 changed files with 68 additions and 38 deletions

View file

@ -18,6 +18,10 @@ data class Conversation(
@ColumnInfo(name = "is_scheduled") var isScheduled: Boolean = false
) {
fun areItemsTheSame(other: Conversation): Boolean {
return threadId == other.threadId
}
fun areContentsTheSame(other: Conversation): Boolean {
return snippet == other.snippet &&
date == other.date &&