Skip to content

Commit

Permalink
Fix sharing on iPad (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthinc authored Aug 11, 2022
1 parent 5c78f70 commit 52377c2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mobile/lib/shared/services/share.service.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
Expand Down Expand Up @@ -39,7 +39,9 @@ class ShareService {
return tempFile.path;
});

Share.shareFiles(await Future.wait(downloadedFilePaths));
Share.shareFiles(
await Future.wait(downloadedFilePaths),
sharePositionOrigin: Rect.zero,
);
}

}

0 comments on commit 52377c2

Please sign in to comment.