quick_frontend, primitivus: notifications refactoring

replaced old "alerts" system by a more generic one which use listeners and can activate callbacks on notification click.
This commit is contained in:
Goffi 2016-06-27 22:36:22 +02:00
commit b388d2b172

View file

@ -63,10 +63,6 @@ class Const(constants.Const):
"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 @@ class Const(constants.Const):
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