diff options
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 21 | ||||
| -rw-r--r-- | gui/src/main/notification-controller.ts | 4 |
2 files changed, 16 insertions, 9 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 95cfc35a55..514fa4b4e8 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -40,6 +40,7 @@ import { CloseToAccountExpiryNotificationProvider, InconsistentVersionNotificationProvider, UnsupportedVersionNotificationProvider, + UpdateAvailableNotificationProvider, } from '../shared/notifications/notification'; import consumePromise from '../shared/promise'; import { Scheduler } from '../shared/scheduler'; @@ -802,12 +803,20 @@ class ApplicationMain { this.upgradeVersion = latestVersionInfo; // notify user to update the app if it became unsupported - const notificationProvider = new UnsupportedVersionNotificationProvider({ - supported: latestVersionInfo.supported, - consistent: this.currentVersion.isConsistent, - suggestedUpgrade: latestVersionInfo.suggestedUpgrade, - }); - if (notificationProvider.mayDisplay()) { + const notificationProviders = [ + new UnsupportedVersionNotificationProvider({ + supported: latestVersionInfo.supported, + consistent: this.currentVersion.isConsistent, + suggestedUpgrade: latestVersionInfo.suggestedUpgrade, + }), + new UpdateAvailableNotificationProvider({ + suggestedUpgrade: latestVersionInfo.suggestedUpgrade, + }), + ]; + const notificationProvider = notificationProviders.find((notificationProvider) => + notificationProvider.mayDisplay(), + ); + if (notificationProvider) { this.notificationController.notify(notificationProvider.getSystemNotification()); } diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts index c5c30b42ef..95c1216b72 100644 --- a/gui/src/main/notification-controller.ts +++ b/gui/src/main/notification-controller.ts @@ -4,7 +4,6 @@ import os from 'os'; import path from 'path'; import { TunnelState } from '../shared/daemon-rpc-types'; import { - BlockWhenDisconnectedNotificationProvider, ConnectedNotificationProvider, ConnectingNotificationProvider, DisconnectedNotificationProvider, @@ -58,8 +57,7 @@ export default class NotificationController { new ConnectingNotificationProvider({ tunnelState, reconnecting: this.reconnecting }), new ConnectedNotificationProvider(tunnelState), new ReconnectingNotificationProvider(tunnelState), - new BlockWhenDisconnectedNotificationProvider({ tunnelState, blockWhenDisconnected }), - new DisconnectedNotificationProvider(tunnelState), + new DisconnectedNotificationProvider({ tunnelState, blockWhenDisconnected }), new ErrorNotificationProvider({ tunnelState, accountExpiry }), ]; |
