Files
immich/mobile/lib/models/view_intent/view_intent_attachment.model.dart
T
Peter Ombodi ef80a8e936 feat(mobile): handle Android ACTION_VIEW intent
- add ViewIntent Pigeon API and generated bindings
- implement Android ViewIntentPlugin + iOS no-op host
- route ExternalMediaViewer by ViewIntentAttachment
- buffer pending view intents and flush on user ready/resume
2026-02-05 18:54:59 +02:00

22 lines
519 B
Dart

import 'dart:io';
import 'package:path/path.dart';
enum ViewIntentAttachmentType { image, video }
class ViewIntentAttachment {
final String path;
final ViewIntentAttachmentType type;
final String? localAssetId;
const ViewIntentAttachment({required this.path, required this.type, this.localAssetId});
File get file => File(path);
String get fileName => basename(file.path);
bool get isImage => type == ViewIntentAttachmentType.image;
bool get isVideo => type == ViewIntentAttachmentType.video;
}