Only set notification tab for none active tabs

This commit is contained in:
Hadi Nategh 2020-07-23 17:39:39 +02:00
parent 0f799acd75
commit 0cea328928
2 changed files with 7 additions and 7 deletions

View File

@ -518,7 +518,11 @@
notifyAppTab: function(_appname, _clear)
{
var tab = this.tabsUi.getTab(_appname);
if (tab) this.tabsUi.getTab(_appname).setNotification(_clear);
// do not set tab's notification if it's the active tab
if (tab && (this.activeApp.appName != _appname || _clear))
{
this.tabsUi.getTab(_appname).setNotification(_clear);
}
}
});
})(window);

View File

@ -824,13 +824,9 @@
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)
{
$topmenu_info_notifications.addClass('egwpopup_notify');