diff frontends/src/primitivus/contact_list.py @ 1408:8a7145138330

quick_frontend, primitivus: move code to remove a new message alert from primitivus to quick_frontend
author souliane <souliane@mailoo.org>
date Thu, 16 Apr 2015 13:31:14 +0200
parents 069ad98b360d
children 683b76c1145d
line wrap: on
line diff
--- a/frontends/src/primitivus/contact_list.py	Thu Apr 09 11:27:13 2015 +0200
+++ b/frontends/src/primitivus/contact_list.py	Thu Apr 16 13:31:14 2015 +0200
@@ -136,16 +136,8 @@
         @param selected: boolean returned by the widget, telling if it is selected
         """
         entity = contact_wid.data
-        if use_bare_jid:
-            to_remove = set()
-            for alert_entity in self._alerts:
-                if alert_entity.bare == entity.bare:
-                    to_remove.add(alert_entity)
-            self._alerts.difference_update(to_remove)
-        else:
-            self._alerts.discard(entity)
+        self.removeAlert(entity, use_bare_jid)
         self.host.modeHint(C.MODE_INSERTION)
-        self.update()
         self._emit('click', entity)
 
     def onNickUpdate(self, entity, new_nick, profile):