From cc01374d3cb6a8bf477e8f96378f20b9aff57536 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 4 Dec 2020 19:11:27 +0100 Subject: Use advertized/server/live time for sorting instead of arrival time fixes #310 --- libdino/src/service/chat_interaction.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libdino/src/service/chat_interaction.vala') 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(); -- cgit v1.2.3-54-g00ecf