diff options
author | fiaxh <git@lightrise.org> | 2020-12-04 19:11:27 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-12-04 19:11:27 +0100 |
commit | cc01374d3cb6a8bf477e8f96378f20b9aff57536 (patch) | |
tree | 16275a127a84d9dc5aa1269aef7590d8fd8ea73d /libdino/src/service/chat_interaction.vala | |
parent | f31e96d6bb51448a87edd820ebca630ca576d890 (diff) | |
download | dino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.tar.gz dino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.zip |
Use advertized/server/live time for sorting instead of arrival time
fixes #310
Diffstat (limited to 'libdino/src/service/chat_interaction.vala')
-rw-r--r-- | libdino/src/service/chat_interaction.vala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala index d777db90..240d22af 100644 --- a/libdino/src/service/chat_interaction.vala +++ b/libdino/src/service/chat_interaction.vala @@ -37,11 +37,10 @@ public class ChatInteraction : StreamInteractionModule, Object { if (read_up_to_item == null) return 0; Database db = Dino.Application.get_default().db; - string local_time = read_up_to_item.sort_time.to_unix().to_string(); - string time = read_up_to_item.display_time.to_unix().to_string(); + string time = read_up_to_item.time.to_unix().to_string(); string id = read_up_to_item.id.to_string(); return (int)db.content_item.select() - .where(@"local_time > ? OR (local_time = ? AND time > ?) OR (local_time = ? AND time = ? AND id > ?)", { local_time, local_time, time, local_time, time, id }) + .where(@"time > ? OR (time = ? AND id > ?)", { time, time, id }) .with(db.content_item.conversation_id, "=", conversation.id) .with(db.content_item.hide, "=", false) .count(); |