Mercurial > libervia-backend
diff frontends/src/quick_frontend/constants.py @ 1972:02d21a589be2
quick_frontend, primitivus: notifications refactoring
replaced old "alerts" system by a more generic one which use listeners and can activate callbacks on notification click.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 27 Jun 2016 22:36:22 +0200 |
parents | 011eff37e21d |
children | 19b9d3f8a6c7 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/constants.py Mon Jun 27 21:45:13 2016 +0200 +++ b/frontends/src/quick_frontend/constants.py Mon Jun 27 22:36:22 2016 +0200 @@ -63,10 +63,6 @@ "paused": u"⦷" } - # Alerts - ALERT_MESSAGE = "MESSAGE" # New message received - ALERT_NICK = "NICK" # our nickname was mentionned - # Blogs ENTRY_MODE_TEXT = "text" ENTRY_MODE_RICH = "rich" @@ -86,4 +82,10 @@ UPDATE_SELECTION = 'SELECTION' UPDATE_STRUCTURE = 'STRUCTURE' # high level update (i.e. not item level but organisation of items) - LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus', 'menu'} + LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus', 'menu', 'notification', 'notificationsClear'} + + # Notifications + NOTIFY_MESSAGE = 'MESSAGE' # a message was received + NOTIFY_MENTION = 'MENTION' # user was mentionned + NOTIFY_PROGRESS_END = 'PROGRESS_END' # a progression has finised + NOTIFY_GENERIC = 'GENERIC' # a notification which has not its own type