From f941807db81816d43081d7b27df1fa8617d6575d Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Thu, 23 Jun 2016 15:33:52 -0300 Subject: [PATCH] Improved regex for detect new messages --- app/ux/WebView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 6e922012..9e9f4cae 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -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':