Browse Source

Service name removed from window title before extracting #unreads from it. 365 in "Outlook 365" no longer interpreted as 365 unreads.

pull/1250/head
Jakob Struye 8 years ago
parent
commit
d1fcd29f2f
  1. 1
      electron/main.js

1
electron/main.js

@ -273,6 +273,7 @@ function createMasterPasswordWindow() {
} }
function updateBadge(title) { function updateBadge(title) {
title = title.split(" - ")[0]; //Discard service name if present, could also contain digits
var messageCount = title.match(/\d+/g) ? parseInt(title.match(/\d+/g).join("")) : 0; var messageCount = title.match(/\d+/g) ? parseInt(title.match(/\d+/g).join("")) : 0;
tray.setBadge(messageCount, config.get('systemtray_indicator')); tray.setBadge(messageCount, config.get('systemtray_indicator'));

Loading…
Cancel
Save