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:
parent
59c8a75cc3
commit
dfbcfe03fc
2 changed files with 1 additions and 5 deletions
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue