Private
Public Access
1
0

Adds incoming bubble animations

This commit is contained in:
2025-06-17 00:47:03 -07:00
parent c70ae00d5b
commit 54ca001892
8 changed files with 141 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
using GLib;
using Gee;
public class Message : Object
public class Message : Object, Comparable<Message>, Hashable<Message>
{
public string guid { get; set; default = ""; }
public string text { get; set; default = ""; }
@@ -9,6 +10,8 @@ public class Message : Object
public Attachment[] attachments { get; set; default = {}; }
public bool should_animate = false;
public bool from_me {
get {
// Hm, this may have been accidental.
@@ -52,4 +55,20 @@ public class Message : Object
this.attachments = attachments.to_array();
}
public int compare_to(Message other) {
if (guid == other.guid) {
return 0;
}
return 1;
}
public bool equal_to(Message other) {
return guid == other.guid;
}
public uint hash() {
return guid.hash();
}
}