changeset 2861:e9e33e05d143

quick frontend (app): fixed notifications ids
author Goffi <goffi@goffi.org>
date Wed, 20 Mar 2019 09:08:47 +0100
parents 851c47cc4ae7
children b2e898384c25
files sat_frontends/quick_frontend/quick_app.py
diffstat 1 files changed, 3 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_app.py	Wed Mar 20 09:08:47 2019 +0100
+++ b/sat_frontends/quick_frontend/quick_app.py	Wed Mar 20 09:08:47 2019 +0100
@@ -897,17 +897,8 @@
                                               profiles=(profile,)):
             widget.onChatState(from_jid, state, profile)
 
-    def notify(
-        self,
-        type_,
-        entity=None,
-        message=None,
-        subject=None,
-        callback=None,
-        cb_args=None,
-        widget=None,
-        profile=C.PROF_KEY_NONE,
-    ):
+    def notify(self, type_, entity=None, message=None, subject=None, callback=None,
+               cb_args=None, widget=None, profile=C.PROF_KEY_NONE):
         """Trigger an event notification
 
         @param type_(unicode): notifation kind,
@@ -937,6 +928,7 @@
             notif_data[widget] = widget
         type_notifs.append(notif_data)
         self._notifications[self._notif_id] = notif_data
+        self._notif_id += 1
         self.callListeners("notification", entity, notif_data, profile=profile)
 
     def getNotifs(self, entity=None, type_=None, exact_jid=None, profile=C.PROF_KEY_NONE):