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

conversationmodel: avoid list blinking when empty conversations


Change-Id: Ibd394f07f14936488922788235f88602f47657bf
Gitlab: #372
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent b9cdce51
No related branches found
No related tags found
No related merge requests found
...@@ -1192,6 +1192,10 @@ ConversationModelPimpl::sortConversations() ...@@ -1192,6 +1192,10 @@ ConversationModelPimpl::sortConversations()
auto historyB = conversationB.interactions; auto historyB = conversationB.interactions;
// A or B is a new conversation (without CONTACT interaction) // A or B is a new conversation (without CONTACT interaction)
if (conversationA.uid.empty() || conversationB.uid.empty()) return conversationA.uid.empty(); if (conversationA.uid.empty() || conversationB.uid.empty()) return conversationA.uid.empty();
if (historyA.empty() && historyB.empty()) {
// If no information to compare, sort by Ring ID
return conversationA.participants.front() > conversationB.participants.front();
}
if (historyA.empty()) return false; if (historyA.empty()) return false;
if (historyB.empty()) return true; if (historyB.empty()) return true;
// Sort by last Interaction // Sort by last Interaction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment