summaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-03-25 12:05:44 +0100
committerTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-05-28 10:28:14 +0200
commit3395ffb705d07e98117790fe288bc675fde5d3da (patch)
tree74fbd2a3d4438fac79d31cfc1646413329173c6c /desktop
parent310932d5c7309e35ae0c7d670cb8a03ba13176a4 (diff)
downloadmullvadvpn-3395ffb705d07e98117790fe288bc675fde5d3da.tar.xz
mullvadvpn-3395ffb705d07e98117790fe288bc675fde5d3da.zip
Update notification to handle new suggested upgrade type
Diffstat (limited to 'desktop')
-rw-r--r--desktop/packages/mullvad-vpn/src/shared/notifications/update-available.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop/packages/mullvad-vpn/src/shared/notifications/update-available.ts b/desktop/packages/mullvad-vpn/src/shared/notifications/update-available.ts
index 732e7bb9a8..180fe132f4 100644
--- a/desktop/packages/mullvad-vpn/src/shared/notifications/update-available.ts
+++ b/desktop/packages/mullvad-vpn/src/shared/notifications/update-available.ts
@@ -1,6 +1,7 @@
import { sprintf } from 'sprintf-js';
import { messages } from '../../shared/gettext';
+import { AppVersionInfoSuggestedUpgrade } from '../daemon-rpc-types';
import { getDownloadUrl } from '../version';
import {
InAppNotification,
@@ -12,7 +13,7 @@ import {
} from './notification';
interface UpdateAvailableNotificationContext {
- suggestedUpgrade?: string;
+ suggestedUpgrade?: AppVersionInfoSuggestedUpgrade;
suggestedIsBeta?: boolean;
}
@@ -22,7 +23,7 @@ export class UpdateAvailableNotificationProvider
public constructor(private context: UpdateAvailableNotificationContext) {}
public mayDisplay() {
- return this.context.suggestedUpgrade ? true : false;
+ return this.context.suggestedUpgrade?.version ? true : false;
}
public getInAppNotification(): InAppNotification {
@@ -62,7 +63,7 @@ export class UpdateAvailableNotificationProvider
// TRANSLATORS: Available placeholders:
// TRANSLATORS: %(version)s - The version number of the new beta version.
messages.pgettext('in-app-notifications', 'Try out the newest beta version (%(version)s).'),
- { version: this.context.suggestedUpgrade },
+ { version: this.context.suggestedUpgrade?.version },
);
} else {
// TRANSLATORS: The in-app banner displayed to the user when the app update is available.
@@ -84,7 +85,7 @@ export class UpdateAvailableNotificationProvider
'notifications',
'Beta update available. Try out the newest beta version (%(version)s).',
),
- { version: this.context.suggestedUpgrade },
+ { version: this.context.suggestedUpgrade?.version },
);
} else {
return messages.pgettext(