mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
25 lines
732 B
Dart
25 lines
732 B
Dart
import 'dart:io';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/platform/view_intent_api.g.dart';
|
|
import 'package:immich_mobile/providers/view_intent/view_intent_handler_android.dart';
|
|
import 'package:immich_mobile/providers/view_intent/view_intent_handler_stub.dart';
|
|
|
|
abstract class ViewIntentHandler {
|
|
void init();
|
|
|
|
Future<void> onAppResumed();
|
|
|
|
Future<void> flushDeferredViewIntent();
|
|
|
|
Future<void> handle(ViewIntentPayload payload);
|
|
|
|
Future<bool> reopenRemoteAsset(String remoteAssetId);
|
|
}
|
|
|
|
final viewIntentHandlerProvider = Provider<ViewIntentHandler>((ref) {
|
|
if (Platform.isAndroid) {
|
|
return AndroidViewIntentHandler(ref);
|
|
}
|
|
|
|
return const StubViewIntentHandler();
|
|
});
|