mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-18 08:35:26 +08:00
contactadapter: invalidate model on modelUpdated
This allow to refresh popup if a contact is added while showing the element. Change-Id: I7dfce7a24f0160a0328205d466bd0d4ae626b90f GitLab: #790
This commit is contained in:
@@ -249,10 +249,20 @@ ContactAdapter::removeContact(const QString& peerUri, bool banContact)
|
||||
void
|
||||
ContactAdapter::connectSignals()
|
||||
{
|
||||
if (lrcInstance_->getCurrentContactModel())
|
||||
if (lrcInstance_->getCurrentContactModel()) {
|
||||
connect(lrcInstance_->getCurrentContactModel(),
|
||||
&ContactModel::bannedStatusChanged,
|
||||
this,
|
||||
&ContactAdapter::bannedStatusChanged,
|
||||
Qt::UniqueConnection);
|
||||
connect(
|
||||
lrcInstance_->getCurrentContactModel(),
|
||||
&ContactModel::modelUpdated,
|
||||
this,
|
||||
[&](const auto& uri) {
|
||||
// Refresh contacts shown
|
||||
selectableProxyModel_->invalidate();
|
||||
},
|
||||
Qt::UniqueConnection);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user