Minor code consistency change
This commit is contained in:
parent
9fbf6fa581
commit
89f378b973
3 changed files with 16 additions and 14 deletions
|
|
@ -18,17 +18,19 @@ data class Conversation(
|
|||
@ColumnInfo(name = "is_scheduled") var isScheduled: Boolean = false
|
||||
) {
|
||||
|
||||
fun areItemsTheSame(other: Conversation): Boolean {
|
||||
return threadId == other.threadId
|
||||
}
|
||||
companion object {
|
||||
fun areItemsTheSame(old: Conversation, new: Conversation): Boolean {
|
||||
return old.threadId == new.threadId
|
||||
}
|
||||
|
||||
fun areContentsTheSame(other: Conversation): Boolean {
|
||||
return snippet == other.snippet &&
|
||||
date == other.date &&
|
||||
read == other.read &&
|
||||
title == other.title &&
|
||||
photoUri == other.photoUri &&
|
||||
isGroupConversation == other.isGroupConversation &&
|
||||
phoneNumber == other.phoneNumber
|
||||
fun areContentsTheSame(old: Conversation, new: Conversation): Boolean {
|
||||
return old.snippet == new.snippet &&
|
||||
old.date == new.date &&
|
||||
old.read == new.read &&
|
||||
old.title == new.title &&
|
||||
old.photoUri == new.photoUri &&
|
||||
old.isGroupConversation == new.isGroupConversation &&
|
||||
old.phoneNumber == new.phoneNumber
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue