Show a dot on tray icon to notify unread messages

Tray icon is too small to show a number.
So a dot(small circle) is used.
This commit is contained in:
Yuya Ochiai
2016-02-25 22:21:28 +09:00
parent 50084fe74f
commit c13afa3745
4 changed files with 18 additions and 3 deletions

View File

@@ -321,7 +321,9 @@ var showUnreadBadgeWindows = function(unreadCount, mentionCount) {
// https://github.com/atom/electron/issues/4011
electron.ipcRenderer.send('win32-overlay', {
overlayDataURL: dataURL,
description: description
description: description,
unreadCount: unreadCount,
mentionCount: mentionCount
});
};
@@ -332,7 +334,7 @@ var showUnreadBadgeWindows = function(unreadCount, mentionCount) {
const dataURL = badge.createDataURL('•');
sendBadge(dataURL, 'You have unread channels');
} else {
remote.getCurrentWindow().setOverlayIcon(null, '');
sendBadge(null, 'You have no unread messages');
}
}