Adds incoming bubble animations
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user