summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-11-07 13:57:07 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-11-09 14:49:49 +0100
commitd6bcbf8a40011586fc59a5f8781372364ab50ecc (patch)
treea00dbab4e8863eedcf60e33ea581ce57ee660a2b /gui
parent4df87e526518eeeb462eefa4f9937ea42016ca66 (diff)
downloadmullvadvpn-d6bcbf8a40011586fc59a5f8781372364ab50ecc.tar.xz
mullvadvpn-d6bcbf8a40011586fc59a5f8781372364ab50ecc.zip
Prevent inconsistent and unsupported version notifications to be displayed when the app is open
Diffstat (limited to 'gui')
-rw-r--r--gui/packages/desktop/src/renderer/lib/notification-controller.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/packages/desktop/src/renderer/lib/notification-controller.js b/gui/packages/desktop/src/renderer/lib/notification-controller.js
index 9cb2f925dc..0133863382 100644
--- a/gui/packages/desktop/src/renderer/lib/notification-controller.js
+++ b/gui/packages/desktop/src/renderer/lib/notification-controller.js
@@ -47,6 +47,10 @@ export default class NotificationController {
}
notifyInconsistentVersion() {
+ if (remote.getCurrentWindow().isVisible()) {
+ return;
+ }
+
this._presentNotificationOnce('inconsistent-version', () => {
new Notification(remote.app.getName(), {
body: 'Inconsistent internal version information, please restart the app',
@@ -56,6 +60,10 @@ export default class NotificationController {
}
notifyUnsupportedVersion(upgradeVersion: string) {
+ if (remote.getCurrentWindow().isVisible()) {
+ return;
+ }
+
this._presentNotificationOnce('unsupported-version', () => {
const notification = new Notification(remote.app.getName(), {
body: `You are running an unsupported app version. Please upgrade to ${upgradeVersion} now to ensure your security`,