Merge pull request #158 from Razzeee/improve-tray
Change tooltip text on mentions/unread
This commit is contained in:
@@ -463,10 +463,10 @@ var showUnreadBadgeWindows = function(unreadCount, mentionCount) {
|
|||||||
|
|
||||||
if (mentionCount > 0) {
|
if (mentionCount > 0) {
|
||||||
const dataURL = badge.createDataURL(mentionCount.toString(), "#FF1744", "#580817"); // Material Red A400
|
const dataURL = badge.createDataURL(mentionCount.toString(), "#FF1744", "#580817"); // Material Red A400
|
||||||
sendBadge(dataURL, 'You have unread mention (' + mentionCount + ')');
|
sendBadge(dataURL, 'You have unread mentions (' + mentionCount + ')');
|
||||||
} else if (unreadCount > 0) {
|
} else if (unreadCount > 0) {
|
||||||
const dataURL = badge.createDataURL('•', "#00e5ff", "#06545D"); // Material Cyan A400
|
const dataURL = badge.createDataURL('•', "#00e5ff", "#06545D"); // Material Cyan A400
|
||||||
sendBadge(dataURL, 'You have unread channels');
|
sendBadge(dataURL, 'You have unread channels (' + unreadCount + ')');
|
||||||
} else {
|
} else {
|
||||||
sendBadge(null, 'You have no unread messages');
|
sendBadge(null, 'You have no unread messages');
|
||||||
}
|
}
|
||||||
|
@@ -201,12 +201,15 @@ app.on('ready', function() {
|
|||||||
|
|
||||||
if (arg.mentionCount > 0) {
|
if (arg.mentionCount > 0) {
|
||||||
trayIcon.setImage(trayImages.mention);
|
trayIcon.setImage(trayImages.mention);
|
||||||
|
trayIcon.setToolTip(arg.mentionCount + ' unread mentions');
|
||||||
}
|
}
|
||||||
else if (arg.unreadCount > 0) {
|
else if (arg.unreadCount > 0) {
|
||||||
trayIcon.setImage(trayImages.unread);
|
trayIcon.setImage(trayImages.unread);
|
||||||
|
trayIcon.setToolTip(arg.unreadCount + ' unread channels');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
trayIcon.setImage(trayImages.normal);
|
trayIcon.setImage(trayImages.normal);
|
||||||
|
trayIcon.setToolTip(app.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user