From 1c24fbf89bb2e2977740c24b8f44c297ccb76003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Wed, 15 Mar 2023 14:40:13 -0400 Subject: [PATCH] conversationmodel: show correct timestamp for syncing conversations Because no interactions was added, a conversation was shown at the bottom while syncing Change-Id: I9cdba00f7fe328e0cf6486d7076fc377fc573a32 --- daemon | 2 +- src/libclient/conversationmodel.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/daemon b/daemon index 977ee99c..c5bbd21e 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit 977ee99c115f8435b0aa0521aa5b54ea7a2d4895 +Subproject commit c5bbd21e1c125f4012e2f88f485816a438ae62a7 diff --git a/src/libclient/conversationmodel.cpp b/src/libclient/conversationmodel.cpp index c008ca5d..55d703c8 100644 --- a/src/libclient/conversationmodel.cpp +++ b/src/libclient/conversationmodel.cpp @@ -3256,6 +3256,16 @@ ConversationModelPimpl::addSwarmConversation(const QString& convId) } } if (details["syncing"] == "true") { + MapStringString messageMap = { + {"type", "initial"}, + {"author", otherMember}, + {"timestamp", details["created"]}, + {"linearizedParent", ""}, + }; + auto msg = interaction::Info(messageMap, linked.owner.profileInfo.uri); + + insertSwarmInteraction(convId, msg, conversation, true); + conversation.lastMessageUid = convId; conversation.needsSyncing = true; Q_EMIT linked.conversationUpdated(conversation.uid); Q_EMIT linked.dataChanged(indexOf(conversation.uid));