From 972a3912968752180d72bcbece3c18b8f433a476 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 26 Jan 2017 00:28:22 +0100 Subject: [PATCH 1/2] only recalculate favicon if it changes --- src/vector/platform/WebPlatform.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index 2029822b61..dda22f3c04 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -60,11 +60,13 @@ export default class WebPlatform extends VectorBasePlatform { } setNotificationCount(count: number) { + if (this.notificationCount === number) return; super.setNotificationCount(count); this._updateFavicon(); } setErrorStatus(errorDidOccur: boolean) { + if (this.errorDidOccur === errorDidOccur) return; super.setErrorStatus(errorDidOccur); this._updateFavicon(); } From 9797c2fb4b8807c31847216ea04fa16341f93feb Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 26 Jan 2017 00:31:52 +0100 Subject: [PATCH 2/2] fix electron too --- src/vector/platform/ElectronPlatform.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index 47bfd9907a..18ad4a5d5b 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -58,6 +58,7 @@ function platformFriendlyName() { export default class ElectronPlatform extends VectorBasePlatform { setNotificationCount(count: number) { + if (this.notificationCount === number) return; super.setNotificationCount(count); // this sometimes throws because electron is made of fail: // https://github.com/electron/electron/issues/7351