1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-31 12:13:36 +02:00

smartlist: avoid updating smartlist on conversationRemoved

Accessing smartlist on conversationRemoved can return invalid
items. Instead, only show welcome view and use modelChanged signal
for updating smartlist.

Also avoid duplicate navigation to welcome view.

Gitlab: #300

Change-Id: Ic1c192fecceeb59287267e3445fabf6afb91ffd5
This commit is contained in:
ababi 2021-02-24 15:37:26 +01:00 committed by Andreas Traczyk
parent 59c8a75cc3
commit dfbcfe03fc
2 changed files with 1 additions and 5 deletions

View file

@ -246,10 +246,7 @@ ConversationsAdapter::connectConversationModel(bool updateFilter)
conversationRemovedConnection_
= QObject::connect(currentConversationModel,
&lrc::api::ConversationModel::conversationRemoved,
[this]() {
conversationSmartListModel_->fillConversationsList();
backToWelcomePage();
});
[this]() { backToWelcomePage(); });
conversationClearedConnection
= QObject::connect(currentConversationModel,

View file

@ -706,5 +706,4 @@ MessagesAdapter::removeConversation(const QString& accountId, const QString& uid
lrcInstance_->getAccountInfo(accountId).conversationModel->removeConversation(uid, banContact);
if (uid == currentConvUid_)
currentConvUid_.clear();
emit navigateToWelcomePageRequested();
}