immich/mobile/pigeon/remote_image_api.dart
Santo Shakil 9862e50aab
fix(mobile): decode remote thumbnails at displayed size (#29965)
* fix(mobile): decode remote thumbnails at displayed size

* use nullable decode size and reuse the tapped thumbnail in the viewer

* clean up decode size naming and guards
2026-08-10 21:14:23 +06:00

30 lines
863 B
Dart

import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/platform/remote_image_api.g.dart',
swiftOut: 'ios/Runner/Images/RemoteImages.g.swift',
swiftOptions: SwiftOptions(includeErrorClass: false),
kotlinOut: 'android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt',
kotlinOptions: KotlinOptions(package: 'app.alextran.immich.images', includeErrorClass: false),
dartOptions: DartOptions(),
dartPackageName: 'immich_mobile',
),
)
@HostApi()
abstract class RemoteImageApi {
/// Width and height are the physical decode size, or null for the source size.
@async
Map<String, int>? requestImage(
String url, {
required int requestId,
required bool preferEncoded,
int? width,
int? height,
});
void cancelRequest(int requestId);
@async
int clearCache();
}