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,
accInfo.conversationModel->selectConversation(convInfo.uid);
accInfo.conversationModel->clearUnreadInteractions(convInfo.uid);
try {
// Set contact filter (for conversation tab selection)
// WARNING: not swarm ready
auto& contact = accInfo.contactModel->getContact(convInfo.participants.front());
if (contact.profileInfo.type != profile::Type::INVALID
&& contact.profileInfo.type != profile::Type::TEMPORARY)
set_profileTypeFilter(contact.profileInfo.type);
} catch (const std::out_of_range& e) {
qWarning() << e.what();
}
// set the account type filter corresponding to the conversation's account type
set_profileTypeFilter(accInfo.profileInfo.type);
// this may be a request, so adjust that filter also
set_filterRequests(convInfo.isRequest);
// reposition index in case of programmatic selection
// 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.
Finish editing this message first!
Please register or to comment