Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #45 from denysdovhan/fix-additional-bug-36
Browse files Browse the repository at this point in the history
(fix) error when launching on macOS with disabled show unread badge
  • Loading branch information
johnnybui authored Apr 15, 2018
2 parents 4e2d498 + 7ddf6aa commit 5870587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ app.on('before-quit', () => {

ipcMain.on('update-unreads-count', (e, unreadCount) => {
if (isDarwin || isLinux) {
app.setBadgeCount(config.get('showUnreadBadge') ? unreadCount : undefined);
if (isDarwin && config.get('bounceDockIcon') && prevUnreadCount !== unreadCount) {
const isUpdated = config.get('showUnreadBadge') ? app.setBadgeCount(unreadCount) : false;
if (isDarwin && config.get('bounceDockIcon') && prevUnreadCount !== unreadCount && isUpdated) {
app.dock.bounce('informational');
prevUnreadCount = unreadCount;
}
Expand Down

0 comments on commit 5870587

Please sign in to comment.