From e45f7d387c2d6a7c7353bd087e9341fbbb86485d Mon Sep 17 00:00:00 2001 From: Eduard Mayer Date: Mon, 11 Jul 2016 21:56:35 +0200 Subject: [PATCH] [bugfix] join the count back again after stripping special chars --- app/ux/WebView.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/ux/WebView.js b/app/ux/WebView.js index a814e30b..142b802c 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -120,9 +120,10 @@ Ext.define('Rambox.ux.WebView',{ webview.addEventListener("page-title-updated", function(e) { var count = e.title.match(/\(([^)]+)\)/); // Get text between (...) - count = count ? count[1] : '0'; - count = count.match(/\d+/g); // Some services have special characters. Example: (•) - count = count ? parseInt(count[0]) : 0; + + count = count ? count[1] : '0'; + count = count.match(/\d+/g).join(""); // Some services have special characters. Example: (•) + count = count ? parseInt(count) : 0; switch ( me.type ) { case 'messenger':