Add load notification from history
This commit is contained in:
@@ -83,8 +83,8 @@ define([
|
||||
if (handlers[type]) {
|
||||
handlers[type](common, data);
|
||||
// add getters to access simply some informations
|
||||
data.content.isClickable = typeof data.content.handler === "function";
|
||||
data.content.isDismissible = typeof data.content.dismissHandler === "function";
|
||||
data.content.isClickable = typeof data.content.handler === "function" && data.content.archived !== true;
|
||||
data.content.isDismissible = typeof data.content.dismissHandler === "function" && data.content.archived !== true;
|
||||
} else {
|
||||
// $(el).find('.cp-notification-dismiss').css('display', 'flex'); // XXX
|
||||
}
|
||||
|
||||
@@ -204,6 +204,15 @@ define([
|
||||
});
|
||||
};
|
||||
};
|
||||
mailbox.getNotificationsHistory = function (type, count, lastKnownHash, cb) {
|
||||
mailbox.getMoreHistory(type, count, lastKnownHash, function (err, messages) {
|
||||
messages.forEach(function (data) {
|
||||
data.content.archived = true;
|
||||
Notifications.add(Common, data);
|
||||
});
|
||||
cb(err, messages);
|
||||
});
|
||||
};
|
||||
|
||||
// CHANNEL WITH WORKER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user