Fix sharing on iPad (#453)

This commit is contained in:
Matthias Rupp 2022-08-11 15:13:33 +02:00 committed by GitHub
parent 5c78f707fe
commit 52377c2dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/shared/providers/api.provider.dart'; import 'package:immich_mobile/shared/providers/api.provider.dart';
import 'package:openapi/api.dart'; import 'package:openapi/api.dart';
@ -10,7 +10,7 @@ import 'package:path/path.dart' as p;
import 'api.service.dart'; import 'api.service.dart';
final shareServiceProvider = final shareServiceProvider =
Provider((ref) => ShareService(ref.watch(apiServiceProvider))); Provider((ref) => ShareService(ref.watch(apiServiceProvider)));
class ShareService { class ShareService {
final ApiService _apiService; final ApiService _apiService;
@ -39,7 +39,9 @@ class ShareService {
return tempFile.path; return tempFile.path;
}); });
Share.shareFiles(await Future.wait(downloadedFilePaths)); Share.shareFiles(
await Future.wait(downloadedFilePaths),
sharePositionOrigin: Rect.zero,
);
} }
} }