Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: download button in desktop

Prateek Sunalb007bec3c22f
diff --git a/auth/lib/services/update_service.dart b/auth/lib/services/update_service.dart
index 23ed22ec8c..89feecf535 100644
--- a/auth/lib/services/update_service.dart
+++ b/auth/lib/services/update_service.dart
@@ -140,6 +140,7 @@ class LatestVersionInfo {
final bool? shouldForceUpdate;
final int lastSupportedVersionCode;
final String? url;
+ final String? release;
final int? size;
final bool? shouldNotify;
@@ -150,6 +151,7 @@ class LatestVersionInfo {
this.shouldForceUpdate,
this.lastSupportedVersionCode,
this.url,
+ this.release,
this.size,
this.shouldNotify,
);
@@ -162,6 +164,7 @@ class LatestVersionInfo {
map['shouldForceUpdate'],
map['lastSupportedVersionCode'] ?? 1,
map['url'],
+ map['release'],
map['size'],
map['shouldNotify'],
);
diff --git a/auth/lib/ui/settings/app_update_dialog.dart b/auth/lib/ui/settings/app_update_dialog.dart
index 6fbccbe434..c396184eaa 100644
--- a/auth/lib/ui/settings/app_update_dialog.dart
+++ b/auth/lib/ui/settings/app_update_dialog.dart
@@ -6,6 +6,7 @@ import 'package:ente_auth/ente_theme_data.dart';
import 'package:ente_auth/l10n/l10n.dart';
import 'package:ente_auth/services/update_service.dart';
import 'package:ente_auth/theme/ente_theme.dart';
+import 'package:ente_auth/utils/platform_util.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:open_filex/open_filex.dart';
@@ -75,7 +76,9 @@ class _AppUpdateDialogState extends State<AppUpdateDialog> {
),
),
onPressed: () => launchUrlString(
- widget.latestVersionInfo!.url!,
+ PlatformUtil.isDesktop()
+ ? widget.latestVersionInfo!.release!
+ : widget.latestVersionInfo!.url!,
mode: LaunchMode.externalApplication,
),
child: Text(