sync adjustment timestamp and store in db

This commit is contained in:
shenlong-tanwen
2025-09-20 00:39:49 +05:30
parent d3646b2eab
commit d1a5ba7a66
11 changed files with 7769 additions and 7 deletions
@@ -4,6 +4,7 @@ class LocalAsset extends BaseAsset {
final String id;
final String? remoteId;
final int orientation;
final int? adjustmentTimestamp;
const LocalAsset({
required this.id,
@@ -19,6 +20,7 @@ class LocalAsset extends BaseAsset {
super.isFavorite = false,
super.livePhotoVideoId,
this.orientation = 0,
this.adjustmentTimestamp,
});
@override
@@ -41,6 +43,7 @@ class LocalAsset extends BaseAsset {
remoteId: ${remoteId ?? "<NA>"}
isFavorite: $isFavorite,
orientation: $orientation,
adjustmentTimestamp: ${adjustmentTimestamp ?? "<NA>"}
}''';
}
@@ -49,11 +52,15 @@ class LocalAsset extends BaseAsset {
bool operator ==(Object other) {
if (other is! LocalAsset) return false;
if (identical(this, other)) return true;
return super == other && id == other.id && orientation == other.orientation;
return super == other &&
id == other.id &&
orientation == other.orientation &&
adjustmentTimestamp == other.adjustmentTimestamp;
}
@override
int get hashCode => super.hashCode ^ id.hashCode ^ remoteId.hashCode ^ orientation.hashCode;
int get hashCode =>
super.hashCode ^ id.hashCode ^ remoteId.hashCode ^ orientation.hashCode ^ adjustmentTimestamp.hashCode;
LocalAsset copyWith({
String? id,
@@ -68,6 +75,7 @@ class LocalAsset extends BaseAsset {
int? durationInSeconds,
bool? isFavorite,
int? orientation,
int? adjustmentTimestamp,
}) {
return LocalAsset(
id: id ?? this.id,
@@ -82,6 +90,7 @@ class LocalAsset extends BaseAsset {
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
isFavorite: isFavorite ?? this.isFavorite,
orientation: orientation ?? this.orientation,
adjustmentTimestamp: adjustmentTimestamp ?? this.adjustmentTimestamp,
);
}
}