From 52377c2dcfa03c28e0ea7e83a37e36be442ed379 Mon Sep 17 00:00:00 2001 From: Matthias Rupp Date: Thu, 11 Aug 2022 15:13:33 +0200 Subject: [PATCH] Fix sharing on iPad (#453) --- mobile/lib/shared/services/share.service.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mobile/lib/shared/services/share.service.dart b/mobile/lib/shared/services/share.service.dart index 6ef4e097e6..6a0e4823d7 100644 --- a/mobile/lib/shared/services/share.service.dart +++ b/mobile/lib/shared/services/share.service.dart @@ -1,6 +1,6 @@ - import 'dart:io'; +import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/shared/providers/api.provider.dart'; import 'package:openapi/api.dart'; @@ -10,7 +10,7 @@ import 'package:path/path.dart' as p; import 'api.service.dart'; final shareServiceProvider = - Provider((ref) => ShareService(ref.watch(apiServiceProvider))); + Provider((ref) => ShareService(ref.watch(apiServiceProvider))); class ShareService { final ApiService _apiService; @@ -39,7 +39,9 @@ class ShareService { return tempFile.path; }); - Share.shareFiles(await Future.wait(downloadedFilePaths)); + Share.shareFiles( + await Future.wait(downloadedFilePaths), + sharePositionOrigin: Rect.zero, + ); } - }