aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-01-28 19:35:01 +0100
committerMario Vavti <mario@mariovavti.com>2018-01-28 19:35:01 +0100
commitedf6ad9eda323f6e04823b8c110d21d82d519d32 (patch)
tree517483b2badac69bad1ada11d553ff827a6bd275
parenta86b260f736cd7298d5d160c658bb9405ad3f69f (diff)
downloadvolse-hubzilla-edf6ad9eda323f6e04823b8c110d21d82d519d32.tar.gz
volse-hubzilla-edf6ad9eda323f6e04823b8c110d21d82d519d32.tar.bz2
volse-hubzilla-edf6ad9eda323f6e04823b8c110d21d82d519d32.zip
do not always look first in chache when receiving the *open* status from cache
-rw-r--r--view/js/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 35f723a58..02b0f125c 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -75,8 +75,6 @@ $(document).ready(function() {
else {
sessionStorage.removeItem('notification_open');
}
-
- $(this).data('clicked', true);
});
if(sessionStorage.getItem('notification_open') !== null) {
@@ -938,9 +936,11 @@ function loadNotificationItems(notifyType) {
var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : '');
var clicked = $('[data-type=\'' + notifyType + '\']').data('clicked');
+
if((clicked === undefined) && (sessionStorage.getItem(notifyType + '_notifications_cache') !== null)) {
var cached_data = JSON.parse(sessionStorage.getItem(notifyType + '_notifications_cache'));
handleNotificationsItems(notifyType, cached_data);
+ $('[data-type=\'' + notifyType + '\']').data('clicked',true);
console.log('updating ' + notifyType + ' notifications from cache...');
}
else {