aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-09-02 14:24:59 +0200
committerfiaxh <git@mx.ax.lt>2018-09-02 14:30:07 +0200
commit0f57191bea9e4bd44af36fafe22212e262ce8221 (patch)
tree568b8684d5b265955197bb1f0380752f32cbab9d /libdino
parentea7efd6399ec57bfaa9791fffc06e53a66cb2442 (diff)
downloaddino-0f57191bea9e4bd44af36fafe22212e262ce8221.tar.gz
dino-0f57191bea9e4bd44af36fafe22212e262ce8221.zip
Fix sent messages sometimes being displayed twice
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/content_item_store.vala5
1 files changed, 1 insertions, 4 deletions
diff --git a/libdino/src/service/content_item_store.vala b/libdino/src/service/content_item_store.vala
index 8c4f4665..0b89e288 100644
--- a/libdino/src/service/content_item_store.vala
+++ b/libdino/src/service/content_item_store.vala
@@ -26,7 +26,6 @@ public class ContentItemStore : StreamInteractionModule, Object {
this.stream_interactor = stream_interactor;
this.db = db;
- stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect((message, conversation) => insert_message(message, conversation));
stream_interactor.get_module(FileManager.IDENTITY).received_file.connect(insert_file_transfer);
}
@@ -180,7 +179,6 @@ public abstract class ContentItem : Object {
public string type_ { get; set; }
public Jid? jid { get; set; default=null; }
public DateTime? sort_time { get; set; default=null; }
- public double seccondary_sort_indicator { get; set; }
public DateTime? display_time { get; set; default=null; }
public Encryption? encryption { get; set; default=null; }
public Entities.Message.Marked? mark { get; set; default=null; }
@@ -190,7 +188,6 @@ public abstract class ContentItem : Object {
this.type_ = ty;
this.jid = jid;
this.sort_time = sort_time;
- this.seccondary_sort_indicator = id;
this.display_time = display_time;
this.encryption = encryption;
this.mark = mark;
@@ -202,7 +199,7 @@ public abstract class ContentItem : Object {
res = a.display_time.compare(b.display_time);
}
if (res == 0) {
- res = a.seccondary_sort_indicator - b.seccondary_sort_indicator > 0 ? 1 : -1;
+ res = a.id - b.id > 0 ? 1 : -1;
}
return res;
}