updates 1201 and 1200 should return success for postgres. notifications: remove class show and session storage entry when we mark all notifications seen

This commit is contained in:
Mario Vavti 2018-02-19 20:23:13 +01:00
parent 43992dc463
commit 2047801b85
4 changed files with 18 additions and 8 deletions

View File

@ -21,4 +21,4 @@ function run() {
}
}
}

View File

@ -10,11 +10,15 @@ function run() {
DROP INDEX item_type,
ADD INDEX uid_item_type (uid, item_type)
");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
else {
return UPDATE_SUCCESS;
}
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
}
}

View File

@ -13,11 +13,15 @@ class _1201 {
ADD INDEX uid_item_blocked (uid, item_blocked),
ADD INDEX item_deleted_pending_remove_changed (item_deleted, item_pending_remove, changed)
");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
else {
return UPDATE_SUCCESS;
}
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
}

View File

@ -357,7 +357,9 @@ function closeMenu(theID) {
function markRead(notifType) {
$.get('ping?f=&markRead='+notifType);
$('.' + notifType + '-button').hide();
$('#nav-' + notifType + '-sub').removeClass('show');
sessionStorage.removeItem(notifType + '_notifications_cache');
sessionStorage.removeItem('notification_open');
if(timer) clearTimeout(timer);
timer = setTimeout(updateInit,2000);
}