High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
chore(mobile): Update share_file to latest version and migrate to using cross platform shareXFile (#1476)
martyfuhryf23979024a72
diff --git a/mobile/lib/shared/services/share.service.dart b/mobile/lib/shared/services/share.service.dartindex c0e61c9d9d..ebf1d9f0fd 100644--- a/mobile/lib/shared/services/share.service.dart+++ b/mobile/lib/shared/services/share.service.dart@@ -22,7 +22,7 @@ class ShareService {}Future<void> shareAssets(List<Asset> assets) async {- final downloadedFilePaths = assets.map((asset) async {+ final downloadedXFiles = assets.map<Future<XFile>>((asset) async {if (asset.isRemote) {final tempDir = await getTemporaryDirectory();final fileName = basename(asset.remote!.originalPath);@@ -33,16 +33,16 @@ class ShareService {isWeb: false,);tempFile.writeAsBytesSync(res.bodyBytes);- return tempFile.path;+ return XFile(tempFile.path);} else {File? f = await asset.local!.file;- return f!.path;+ return XFile(f!.path);}});// ignore: deprecated_member_use- Share.shareFiles(- await Future.wait(downloadedFilePaths),+ Share.shareXFiles(+ await Future.wait(downloadedXFiles),sharePositionOrigin: Rect.zero,);}diff --git a/mobile/pubspec.lock b/mobile/pubspec.lockindex 4aa83e7981..6ec5b7b3dc 100644--- a/mobile/pubspec.lock+++ b/mobile/pubspec.lock@@ -210,7 +210,7 @@ packages:name: cross_fileurl: "https://pub.dartlang.org"source: hosted- version: "0.3.3+1"+ version: "0.3.3+2"crypto:dependency: transitivedescription:@@ -868,42 +868,14 @@ packages:name: share_plusurl: "https://pub.dartlang.org"source: hosted- version: "4.0.10"- share_plus_linux:- dependency: transitive- description:- name: share_plus_linux- url: "https://pub.dartlang.org"- source: hosted- version: "3.0.0"- share_plus_macos:- dependency: transitive- description:- name: share_plus_macos- url: "https://pub.dartlang.org"- source: hosted- version: "3.0.1"+ version: "6.3.0"share_plus_platform_interface:dependency: transitivedescription:name: share_plus_platform_interfaceurl: "https://pub.dartlang.org"source: hosted- version: "3.0.3"- share_plus_web:- dependency: transitive- description:- name: share_plus_web- url: "https://pub.dartlang.org"- source: hosted- version: "3.0.1"- share_plus_windows:- dependency: transitive- description:- name: share_plus_windows- url: "https://pub.dartlang.org"- source: hosted- version: "3.0.1"+ version: "3.2.0"shared_preferences:dependency: transitivedescription:@@ -1174,14 +1146,14 @@ packages:name: url_launcher_platform_interfaceurl: "https://pub.dartlang.org"source: hosted- version: "2.0.5"+ version: "2.1.1"url_launcher_web:dependency: transitivedescription:name: url_launcher_weburl: "https://pub.dartlang.org"source: hosted- version: "2.0.11"+ version: "2.0.14"url_launcher_windows:dependency: transitivedescription:@@ -1279,7 +1251,7 @@ packages:name: wakelock_windowsurl: "https://pub.dartlang.org"source: hosted- version: "0.2.0"+ version: "0.2.1"watcher:dependency: transitivedescription:@@ -1307,7 +1279,7 @@ packages:name: win32url: "https://pub.dartlang.org"source: hosted- version: "2.7.0"+ version: "3.1.3"wkt_parser:dependency: transitivedescription:diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex 0b6fdc8251..4dec20d1d4 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -32,7 +32,7 @@ dependencies:http: 0.13.4cancellation_token_http: ^1.1.0easy_localization: ^3.0.1- share_plus: ^4.0.10+ share_plus: ^6.3.0flutter_displaymode: ^0.4.0scrollable_positioned_list: ^0.3.4path: ^1.8.1