Don't save data in notification

This commit is contained in:
Ruud
2014-09-17 21:50:41 +02:00
parent 12150c5efc
commit 76322c0145
2 changed files with 9 additions and 4 deletions
+7 -2
View File
@@ -155,9 +155,14 @@ class CoreNotifier(Notification):
n = {
'_t': 'notification',
'time': int(time.time()),
'message': toUnicode(message),
'data': data
'message': toUnicode(message)
}
if data.get('sticky'):
n['sticky'] = True
if data.get('important'):
n['important'] = True
db.insert(n)
self.frontend(type = listener, data = n)
@@ -50,7 +50,7 @@ var NotificationBase = new Class({
, 'top');
self.notifications.include(result);
if((result.data.important !== undefined || result.data.sticky !== undefined) && !result.read){
if((result.important !== undefined || result.sticky !== undefined) && !result.read){
var sticky = true;
App.trigger('message', [result.message, sticky, result])
}
@@ -72,7 +72,7 @@ var NotificationBase = new Class({
if(!force_ids) {
var rn = self.notifications.filter(function(n){
return !n.read && n.data.important === undefined
return !n.read && n.important === undefined
});
var ids = [];