diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-02-27 11:28:13 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-02-27 11:28:13 -0300 |
| commit | 068b0bdea9bad08c9ade30fa70d7619db89344d8 (patch) | |
| tree | c1b14235cfe93505c02d1812ec406b08a4155a04 | |
| parent | 08418a76dce2c1008ff4f31b157eb8a112917fe1 (diff) | |
| parent | 74498f0909eb7999f829e91bfbd058ae47555003 (diff) | |
| download | mullvadvpn-068b0bdea9bad08c9ade30fa70d7619db89344d8.tar.xz mullvadvpn-068b0bdea9bad08c9ade30fa70d7619db89344d8.zip | |
Merge branch 'fix-missing-notifications'
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | gui/packages/desktop/src/main/index.ts | 5 | ||||
| -rw-r--r-- | gui/packages/desktop/src/main/notification-controller.ts | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 41439129c5..86b20c7df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ Line wrap the file at 100 chars. Th - Fix the potential reconnect loop in GUI, triggered by the timeout when receiving the initial state of the daemon. - Fix the bug which caused the account token history to remain stale after logout. +- Fix some notifications not appearing depending on how the window is shown and hidden while the + tunnel state changes. #### Linux - Fix startup failure when network device with a hardware address that's not a MAC address is diff --git a/gui/packages/desktop/src/main/index.ts b/gui/packages/desktop/src/main/index.ts index c017e1e61c..14f4186ee3 100644 --- a/gui/packages/desktop/src/main/index.ts +++ b/gui/packages/desktop/src/main/index.ts @@ -762,6 +762,11 @@ class ApplicationMain { windowController.send('window-shown'); }); + + windowController.window.on('hide', () => { + // ensure notification guard is reset + this.notificationController.resetTunnelStateAnnouncements(); + }); } private registerIpcListeners() { diff --git a/gui/packages/desktop/src/main/notification-controller.ts b/gui/packages/desktop/src/main/notification-controller.ts index e1df2823b8..35314aa73a 100644 --- a/gui/packages/desktop/src/main/notification-controller.ts +++ b/gui/packages/desktop/src/main/notification-controller.ts @@ -113,6 +113,10 @@ export default class NotificationController { } } + public resetTunnelStateAnnouncements() { + this.lastTunnelStateAnnouncement = undefined; + } + private showTunnelStateNotification(message: string) { const lastAnnouncement = this.lastTunnelStateAnnouncement; const sameAsLastNotification = lastAnnouncement && lastAnnouncement.body === message; |
