Browse Source

Fixed bug of app title related to badges

Related to #91
pull/116/head 0.4.0
Ramiro Saenz 9 years ago
parent
commit
8d8ef672e7
  1. 2
      app/util/Format.js
  2. 2
      electron/main.js

2
app/util/Format.js

@ -9,6 +9,6 @@ Ext.define('Rambox.util.Format', {
}
,stripNumber: function(n) {
return (typeof n == "number") ? n : parseInt(n.match(/\d+/g).join(""));
return (typeof n == "number") ? n : n.match(/\d+/g) ? parseInt(n.match(/\d+/g).join("")) : 0;
}
});

2
electron/main.js

@ -163,7 +163,7 @@ function createWindow () {
}
function updateBadge(title) {
const messageCount = (/\(([0-9]+)\)/).exec(title);
var messageCount = title.match(/\d+/g) ? parseInt(title.match(/\d+/g).join("")) : 0;
if (process.platform === 'win32') {
tray.setBadge(messageCount);

Loading…
Cancel
Save