mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
feat(mobile): add playbackStyle to native sync API (#26541)
* feat(mobile): add playbackStyle to native sync API Adds a `playbackStyle` field to `PlatformAsset` in the pigeon sync API so native platforms can communicate the asset's playback style (image, video, animated, livePhoto) to Flutter during sync. - Add `playbackStyleValue` computed property to `PHAsset` extension (iOS) - Populate `playbackStyle` in `toPlatformAsset()` and the full-sync path - Update generated Dart/Kotlin/Swift files * fix(tests): add playbackStyle to local asset test cases * fix(tests): update playbackStyle to use integer values in local sync tests * feat(mobile): extend playbackStyle enum to include videoLooping * Update PHAssetExtensions.swift Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(playback): simplify playbackStyleValue implementation by removing iOS version check * feat(android): implement proper playbackStyle detection * add PlatformAssetPlaybackStyle enum * linting --------- Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
aa87d1b9a3
commit
d6c724b13b
8 changed files with 239 additions and 45 deletions
|
|
@ -11,6 +11,15 @@ import 'package:pigeon/pigeon.dart';
|
|||
dartPackageName: 'immich_mobile',
|
||||
),
|
||||
)
|
||||
enum PlatformAssetPlaybackStyle {
|
||||
unknown,
|
||||
image,
|
||||
video,
|
||||
imageAnimated,
|
||||
livePhoto,
|
||||
videoLooping,
|
||||
}
|
||||
|
||||
class PlatformAsset {
|
||||
final String id;
|
||||
final String name;
|
||||
|
|
@ -31,6 +40,8 @@ class PlatformAsset {
|
|||
final double? latitude;
|
||||
final double? longitude;
|
||||
|
||||
final PlatformAssetPlaybackStyle playbackStyle;
|
||||
|
||||
const PlatformAsset({
|
||||
required this.id,
|
||||
required this.name,
|
||||
|
|
@ -45,6 +56,7 @@ class PlatformAsset {
|
|||
this.adjustmentTime,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.playbackStyle = PlatformAssetPlaybackStyle.unknown,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue