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

Commit

Permalink
Improved regex for detect new messages
Browse files Browse the repository at this point in the history
  • Loading branch information
saenzramiro committed Jun 23, 2016
1 parent 3ec355a commit f941807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/ux/WebView.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ Ext.define('Rambox.ux.WebView',{
});

webview.addEventListener("page-title-updated", function(e) {
var count = e.title.match(/\((\d+)\)/);
var count = e.title.match(/\(([^)]+)\)/);
count = count ? parseInt(count[1]) : 0;
count = Ext.isNaN(count) ? 0 : count; // Some services have special characters. Example: (•)

switch ( me.type ) {
case 'messenger':
Expand Down

0 comments on commit f941807

Please sign in to comment.