2025-01-16 21:20:44 -06:00
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
|
import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart';
|
|
|
|
|
import 'package:immich_mobile/repositories/share_handler.repository.dart';
|
|
|
|
|
|
2025-07-29 00:34:03 +05:30
|
|
|
final shareIntentServiceProvider = Provider((ref) => ShareIntentService(ref.watch(shareHandlerRepositoryProvider)));
|
2025-01-16 21:20:44 -06:00
|
|
|
|
|
|
|
|
class ShareIntentService {
|
|
|
|
|
final ShareHandlerRepository shareHandlerRepository;
|
|
|
|
|
void Function(List<ShareIntentAttachment> attachments)? onSharedMedia;
|
|
|
|
|
|
2025-07-29 00:34:03 +05:30
|
|
|
ShareIntentService(this.shareHandlerRepository);
|
2025-01-16 21:20:44 -06:00
|
|
|
|
|
|
|
|
void init() {
|
|
|
|
|
shareHandlerRepository.onSharedMedia = onSharedMedia;
|
|
|
|
|
shareHandlerRepository.init();
|
|
|
|
|
}
|
|
|
|
|
}
|