mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
feat(mobile): hash assets in isolate (#18924)
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
enum BackupSelection {
|
||||
none,
|
||||
selected,
|
||||
excluded,
|
||||
none._(1),
|
||||
selected._(0),
|
||||
excluded._(2);
|
||||
|
||||
// Used to sort albums based on the backupSelection
|
||||
// selected -> none -> excluded
|
||||
final int sortOrder;
|
||||
const BackupSelection._(this.sortOrder);
|
||||
}
|
||||
|
||||
class LocalAlbum {
|
||||
final String id;
|
||||
final String name;
|
||||
final DateTime updatedAt;
|
||||
final bool isIosSharedAlbum;
|
||||
|
||||
final int assetCount;
|
||||
final BackupSelection backupSelection;
|
||||
@@ -18,6 +24,7 @@ class LocalAlbum {
|
||||
required this.updatedAt,
|
||||
this.assetCount = 0,
|
||||
this.backupSelection = BackupSelection.none,
|
||||
this.isIosSharedAlbum = false,
|
||||
});
|
||||
|
||||
LocalAlbum copyWith({
|
||||
@@ -26,6 +33,7 @@ class LocalAlbum {
|
||||
DateTime? updatedAt,
|
||||
int? assetCount,
|
||||
BackupSelection? backupSelection,
|
||||
bool? isIosSharedAlbum,
|
||||
}) {
|
||||
return LocalAlbum(
|
||||
id: id ?? this.id,
|
||||
@@ -33,6 +41,7 @@ class LocalAlbum {
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
assetCount: assetCount ?? this.assetCount,
|
||||
backupSelection: backupSelection ?? this.backupSelection,
|
||||
isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -45,7 +54,8 @@ class LocalAlbum {
|
||||
other.name == name &&
|
||||
other.updatedAt == updatedAt &&
|
||||
other.assetCount == assetCount &&
|
||||
other.backupSelection == backupSelection;
|
||||
other.backupSelection == backupSelection &&
|
||||
other.isIosSharedAlbum == isIosSharedAlbum;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -54,7 +64,8 @@ class LocalAlbum {
|
||||
name.hashCode ^
|
||||
updatedAt.hashCode ^
|
||||
assetCount.hashCode ^
|
||||
backupSelection.hashCode;
|
||||
backupSelection.hashCode ^
|
||||
isIosSharedAlbum.hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -65,6 +76,7 @@ name: $name,
|
||||
updatedAt: $updatedAt,
|
||||
assetCount: $assetCount,
|
||||
backupSelection: $backupSelection,
|
||||
isIosSharedAlbum: $isIosSharedAlbum
|
||||
}''';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user