π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove unused code for app-updates
vishnukvmd46522c329c3e
diff --git a/auth/ios/Podfile.lock b/auth/ios/Podfile.lockindex dc7d8d0436..9e781fd489 100644--- a/auth/ios/Podfile.lock+++ b/auth/ios/Podfile.lock@@ -71,8 +71,6 @@ PODS:- move_to_background (0.0.1):- Flutter- MTBBarcodeScanner (5.0.11)- - open_filex (0.0.2):- - Flutter- OrderedSet (5.0.0)- package_info_plus (0.4.5):- Flutter@@ -126,7 +124,6 @@ DEPENDENCIES:- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)- move_to_background (from `.symlinks/plugins/move_to_background/ios`)- - open_filex (from `.symlinks/plugins/open_filex/ios`)- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)- privacy_screen (from `.symlinks/plugins/privacy_screen/ios`)@@ -183,8 +180,6 @@ EXTERNAL SOURCES::path: ".symlinks/plugins/local_auth_ios/ios"move_to_background::path: ".symlinks/plugins/move_to_background/ios"- open_filex:- :path: ".symlinks/plugins/open_filex/ios"package_info_plus::path: ".symlinks/plugins/package_info_plus/ios"path_provider_foundation:@@ -226,7 +221,6 @@ SPEC CHECKSUMS:local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2dMTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb- open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93cpackage_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943diff --git a/auth/lib/ui/settings/app_update_dialog.dart b/auth/lib/ui/settings/app_update_dialog.dartindex 5d05dddc5c..12049017c2 100644--- a/auth/lib/ui/settings/app_update_dialog.dart+++ b/auth/lib/ui/settings/app_update_dialog.dart@@ -1,14 +1,7 @@-import 'dart:io';--import 'package:ente_auth/core/configuration.dart';-import 'package:ente_auth/core/network.dart';-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:flutter/material.dart';-import 'package:logging/logging.dart';-import 'package:open_filex/open_filex.dart';import 'package:url_launcher/url_launcher_string.dart';class AppUpdateDialog extends StatefulWidget {@@ -114,116 +107,3 @@ class _AppUpdateDialogState extends State<AppUpdateDialog> {);}}--class ApkDownloaderDialog extends StatefulWidget {- final LatestVersionInfo? versionInfo;-- const ApkDownloaderDialog(this.versionInfo, {Key? key}) : super(key: key);-- @override- State<ApkDownloaderDialog> createState() => _ApkDownloaderDialogState();-}--class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {- String? _saveUrl;- double? _downloadProgress;-- @override- void initState() {- super.initState();- _saveUrl = Configuration.instance.getTempDirectory() +- "ente-" +- widget.versionInfo!.name! +- ".apk";- _downloadApk();- }-- @override- Widget build(BuildContext context) {- return WillPopScope(- onWillPop: () async => false,- child: AlertDialog(- title: const Text(- "Downloading...",- style: TextStyle(- fontSize: 16,- ),- textAlign: TextAlign.center,- ),- content: LinearProgressIndicator(- value: _downloadProgress,- valueColor: AlwaysStoppedAnimation<Color>(- Theme.of(context).colorScheme.alternativeColor,- ),- ),- ),- );- }-- Future<void> _downloadApk() async {- try {- if (!File(_saveUrl!).existsSync()) {- await Network.instance.getDio().download(- widget.versionInfo!.url!,- _saveUrl,- onReceiveProgress: (count, _) {- setState(() {- _downloadProgress = count / widget.versionInfo!.size!;- });- },- );- }- Navigator.of(context, rootNavigator: true).pop('dialog');- // ignore: unawaited_futures- OpenFilex.open(_saveUrl);- } catch (e) {- Logger("ApkDownloader").severe(e);- final AlertDialog alert = AlertDialog(- title: const Text("Sorry"),- content: const Text("The download could not be completed"),- actions: [- TextButton(- child: const Text(- "Ignore",- style: TextStyle(- color: Colors.white,- ),- ),- onPressed: () {- Navigator.of(context, rootNavigator: true).pop('dialog');- Navigator.of(context, rootNavigator: true).pop('dialog');- },- ),- TextButton(- child: Text(- "Retry",- style: TextStyle(- color: Theme.of(context).colorScheme.alternativeColor,- ),- ),- onPressed: () {- Navigator.of(context, rootNavigator: true).pop('dialog');- Navigator.of(context, rootNavigator: true).pop('dialog');- showDialog(- context: context,- builder: (BuildContext context) {- return ApkDownloaderDialog(widget.versionInfo);- },- barrierDismissible: false,- );- },- ),- ],- );- // ignore: unawaited_futures- showDialog(- context: context,- builder: (BuildContext context) {- return alert;- },- barrierColor: Colors.black87,- );- return;- }- }-}diff --git a/auth/pubspec.lock b/auth/pubspec.lockindex 7f0c7cf0b4..4514e503ca 100644--- a/auth/pubspec.lock+++ b/auth/pubspec.lock@@ -879,14 +879,6 @@ packages:url: "https://pub.dev"source: hostedversion: "2.0.2"- open_filex:- dependency: "direct main"- description:- name: open_filex- sha256: "854aefd72dfd74219dc8c8d1767c34ec1eae64b8399a5be317bddb1ec2108915"- url: "https://pub.dev"- source: hosted- version: "4.3.2"otp:dependency: "direct main"description:diff --git a/auth/pubspec.yaml b/auth/pubspec.yamlindex 042e78512a..5e78084078 100644--- a/auth/pubspec.yaml+++ b/auth/pubspec.yaml@@ -54,13 +54,11 @@ dependencies:intl: ^0.18.0json_annotation: ^4.5.0local_auth: ^2.1.7-local_auth_android: ^1.0.31local_auth_ios: ^1.1.3logging: ^1.0.1modal_bottom_sheet: ^3.0.0-premove_to_background: ^1.0.2- open_filex: ^4.3.2otp: ^3.1.1package_info_plus: ^4.1.0password_strength: ^0.2.0