Skip to content
Snippets Groups Projects
Commit bd9eea5f authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud
Browse files

conversation_module: update only if information are up to date

Change-Id: Ic62588f1c759993192d076cf979ad51904974273
parent 7d256c54
Branches
Tags
No related merge requests found
...@@ -2112,6 +2112,9 @@ ConversationModule::onSyncData(const SyncMsg& msg, ...@@ -2112,6 +2112,9 @@ ConversationModule::onSyncData(const SyncMsg& msg,
auto conv = pimpl_->startConversation(convInfo); auto conv = pimpl_->startConversation(convInfo);
std::unique_lock<std::mutex> lk(conv->mtx); std::unique_lock<std::mutex> lk(conv->mtx);
auto update = std::max(convInfo.created, convInfo.removed) >= std::max(conv->info.created, conv->info.removed);
if (!update)
continue;
if (not convInfo.isRemoved()) { if (not convInfo.isRemoved()) {
// If multi devices, it can detect a conversation that was already // If multi devices, it can detect a conversation that was already
// removed, so just check if the convinfo contains a removed conv // removed, so just check if the convinfo contains a removed conv
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment