From c7016751c72f506f95dbf39d2f9075a95464cc7a Mon Sep 17 00:00:00 2001
From: Ming Rui Zhang <mingrui.zhang@savoirfairelinux.com>
Date: Mon, 16 Aug 2021 15:08:27 -0400
Subject: [PATCH] contactmodel: make refreshFilter and emit contactRemoved
 general

Change-Id: I9679df3bda97d4401ea137088d006820154d141b
---
 src/contactmodel.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp
index 50fd2baa..1dee9092 100644
--- a/src/contactmodel.cpp
+++ b/src/contactmodel.cpp
@@ -891,13 +891,12 @@ ContactModelPimpl::slotContactRemoved(const QString& accountId,
         }
     }
 
+    // Update the smartlist
+    linked.owner.conversationModel->refreshFilter();
     if (banned) {
-        // Update the smartlist
-        linked.owner.conversationModel->refreshFilter();
         emit linked.bannedStatusChanged(contactUri, true);
-    } else {
-        emit linked.contactRemoved(contactUri);
     }
+    emit linked.contactRemoved(contactUri);
 }
 
 void
-- 
GitLab