mirror of
https://github.com/immich-app/immich.git
synced 2026-05-23 08:02:29 -04:00
ef80a8e936
- 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
22 lines
519 B
Dart
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;
|
|
}
|