Skip to content
Snippets Groups Projects
Commit 392c423b authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

conversations: fix filter setting when a conversation is selected

Set the account and request filters separately.

Change-Id: Ib7d93caa4058e086d3cbcf39ac3fb9a30097aba1
parent 416be083
No related branches found
No related tags found
No related merge requests found
...@@ -73,16 +73,11 @@ ConversationsAdapter::ConversationsAdapter(SystemTray* systemTray, ...@@ -73,16 +73,11 @@ ConversationsAdapter::ConversationsAdapter(SystemTray* systemTray,
accInfo.conversationModel->selectConversation(convInfo.uid); accInfo.conversationModel->selectConversation(convInfo.uid);
accInfo.conversationModel->clearUnreadInteractions(convInfo.uid); accInfo.conversationModel->clearUnreadInteractions(convInfo.uid);
try { // set the account type filter corresponding to the conversation's account type
// Set contact filter (for conversation tab selection) set_profileTypeFilter(accInfo.profileInfo.type);
// WARNING: not swarm ready
auto& contact = accInfo.contactModel->getContact(convInfo.participants.front()); // this may be a request, so adjust that filter also
if (contact.profileInfo.type != profile::Type::INVALID set_filterRequests(convInfo.isRequest);
&& contact.profileInfo.type != profile::Type::TEMPORARY)
set_profileTypeFilter(contact.profileInfo.type);
} catch (const std::out_of_range& e) {
qWarning() << e.what();
}
// reposition index in case of programmatic selection // reposition index in case of programmatic selection
// currently, this may only occur for the conversation list // currently, this may only occur for the conversation list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment