Skip to content
Snippets Groups Projects
Commit 2feead16 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conversationmodel: recompute lastDisplayed from daemon signals

Change-Id: I628ce5a793e8fb8285c73e5a9f24dc2fc2e647f0
parent f5e4619d
No related branches found
No related tags found
No related merge requests found
......@@ -3449,6 +3449,17 @@ ConversationModelPimpl::slotUpdateInteractionStatus(const QString& accountId,
auto previous = conversation.interactions->getRead(peerId);
if (peerId != linked.owner.profileInfo.uri)
conversation.interactions->setRead(peerId, messageId);
else {
// Here, this means that the daemon synched the displayed message
// so, compute the number of unread messages.
conversation.unreadMessages = ConfigurationManager::instance()
.countInteractions(linked.owner.id,
conversationId,
messageId,
"",
peerId);
Q_EMIT linked.dataChanged(indexOf(conversationId));
}
emit linked.displayedInteractionChanged(conversationId, peerId, previous, messageId);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment