Skip to content
Snippets Groups Projects
Commit 5f7bf66b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

contactadapter: invalidate model on modelUpdated

This allow to refresh popup if a contact is added while showing
the element.

Change-Id: I7dfce7a24f0160a0328205d466bd0d4ae626b90f
GitLab: #790
parent c1594e54
No related branches found
No related tags found
No related merge requests found
...@@ -249,10 +249,20 @@ ContactAdapter::removeContact(const QString& peerUri, bool banContact) ...@@ -249,10 +249,20 @@ ContactAdapter::removeContact(const QString& peerUri, bool banContact)
void void
ContactAdapter::connectSignals() ContactAdapter::connectSignals()
{ {
if (lrcInstance_->getCurrentContactModel()) if (lrcInstance_->getCurrentContactModel()) {
connect(lrcInstance_->getCurrentContactModel(), connect(lrcInstance_->getCurrentContactModel(),
&ContactModel::bannedStatusChanged, &ContactModel::bannedStatusChanged,
this, this,
&ContactAdapter::bannedStatusChanged, &ContactAdapter::bannedStatusChanged,
Qt::UniqueConnection); Qt::UniqueConnection);
connect(
lrcInstance_->getCurrentContactModel(),
&ContactModel::modelUpdated,
this,
[&](const auto& uri) {
// Refresh contacts shown
selectableProxyModel_->invalidate();
},
Qt::UniqueConnection);
}
} }
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