Implement framework tab's notification

This commit is contained in:
Hadi Nategh
2020-07-23 15:50:15 +02:00
parent cf06054fd7
commit 1815b1e985
3 changed files with 60 additions and 2 deletions

View File

@ -812,9 +812,24 @@
{
var $topmenu_info_notifications = jQuery('#topmenu_info_notifications');
var counter = 0;
for(var j in notifymessages)
{
//reset all tab notifications
framework.notifyAppTab(notifymessages[j]['extra_data']['app'], true);
}
for (var id in notifymessages)
{
if (notifymessages[id]['status'] != 'SEEN') counter++;
if (notifymessages[id]['status'] != 'SEEN')
{
counter++;
// do not set tab's notification if it's the active tab
if (framework.activeApp.appName != notifymessages[id]['extra_data']['app'])
{
framework.notifyAppTab(notifymessages[id]['extra_data']['app']);
}
}
}
if (counter > 0)
{