Fix desktop notifications (#1251)

This commit is contained in:
whales 2019-03-14 20:59:05 +10:30 committed by Guangcong Luo
parent 13dfe03a3a
commit d4f7d6668c

View File

@ -147,7 +147,7 @@
sideBuf += this.renderRoomTab(room);
}
if (window.nodewebkit) {
if (nwWindow.setBadgeLabel) nwWindow.setBadgeLabel('' + notificationCount || '');
if (nwWindow.setBadgeLabel) nwWindow.setBadgeLabel(notificationCount ? '' + notificationCount : '');
} else {
var $favicon = $('#dynamic-favicon');
if (!!$favicon.data('on') !== !!notificationCount) {