mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-06 11:15:53 +00:00
refactor(mobile): shared_handler.interface.dart (#19333)
refactor(mobile): shared_handler.repository.dart
This commit is contained in:
parent
5c74f634b7
commit
1f2c779b36
2 changed files with 1 additions and 11 deletions
|
|
@ -1,7 +0,0 @@
|
|||
import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart';
|
||||
|
||||
abstract interface class IShareHandlerRepository {
|
||||
void Function(List<ShareIntentAttachment>)? onSharedMedia;
|
||||
|
||||
Future<void> init();
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/interfaces/share_handler.interface.dart';
|
||||
import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart';
|
||||
import 'package:share_handler/share_handler.dart';
|
||||
|
||||
|
|
@ -9,13 +8,11 @@ final shareHandlerRepositoryProvider = Provider(
|
|||
(ref) => ShareHandlerRepository(),
|
||||
);
|
||||
|
||||
class ShareHandlerRepository implements IShareHandlerRepository {
|
||||
class ShareHandlerRepository {
|
||||
ShareHandlerRepository();
|
||||
|
||||
@override
|
||||
void Function(List<ShareIntentAttachment> attachments)? onSharedMedia;
|
||||
|
||||
@override
|
||||
Future<void> init() async {
|
||||
final handler = ShareHandlerPlatform.instance;
|
||||
final media = await handler.getInitialSharedMedia();
|
||||
|
|
|
|||
Loading…
Reference in a new issue