~buzzert/Kordophone#9: gtk v2: Conversation selected state lost when reloading
This commit is contained in:
@@ -52,4 +52,21 @@ public class Conversation : Object {
|
||||
_display_name = conversation_data["display_name"].get_string();
|
||||
}
|
||||
}
|
||||
|
||||
public bool equals(Conversation other) {
|
||||
if (other == null) return false;
|
||||
if (guid != other.guid) return false;
|
||||
if (date != other.date) return false;
|
||||
if (unread_count != other.unread_count) return false;
|
||||
if (last_message_preview != other.last_message_preview) return false;
|
||||
if (_display_name != other._display_name) return false;
|
||||
|
||||
// Compare participants arrays
|
||||
if (participants.length != other.participants.length) return false;
|
||||
for (int i = 0; i < participants.length; i++) {
|
||||
if (participants[i] != other.participants[i]) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user