mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
ticker fix
This commit is contained in:
parent
a3c6cba47e
commit
23c1a3d565
1 changed files with 5 additions and 1 deletions
|
@ -60,7 +60,11 @@ function setupNotifications() {
|
||||||
setTimeout(getNewNotifications, NOTIFICATION_INTERVAL);
|
setTimeout(getNewNotifications, NOTIFICATION_INTERVAL);
|
||||||
|
|
||||||
// Update the current number of notifications based on the latest page load
|
// Update the current number of notifications based on the latest page load
|
||||||
storeNotificationCount($('.js-notification-ticker').dataset.notificationCount);
|
const ticker = $('.js-notification-ticker');
|
||||||
|
|
||||||
|
if (ticker) {
|
||||||
|
storeNotificationCount(ticker.dataset.notificationCount);
|
||||||
|
}
|
||||||
|
|
||||||
// Update ticker when the stored value changes - this will occur in all open tabs
|
// Update ticker when the stored value changes - this will occur in all open tabs
|
||||||
store.watch('notificationCount', updateNotificationTicker);
|
store.watch('notificationCount', updateNotificationTicker);
|
||||||
|
|
Loading…
Reference in a new issue