1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

fix(web): show trash indicator (#12521)

This commit is contained in:
Jason Rasmussen
2024-09-09 16:03:17 -04:00
committed by GitHub
parent 8c3c3357fe
commit d39917a4db
14 changed files with 77 additions and 24 deletions

View File

@ -16,6 +16,7 @@ class AssetBulkUploadCheckResult {
required this.action,
this.assetId,
required this.id,
this.isTrashed,
this.reason,
});
@ -31,6 +32,14 @@ class AssetBulkUploadCheckResult {
String id;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isTrashed;
AssetBulkUploadCheckResultReasonEnum? reason;
@override
@ -38,6 +47,7 @@ class AssetBulkUploadCheckResult {
other.action == action &&
other.assetId == assetId &&
other.id == id &&
other.isTrashed == isTrashed &&
other.reason == reason;
@override
@ -46,10 +56,11 @@ class AssetBulkUploadCheckResult {
(action.hashCode) +
(assetId == null ? 0 : assetId!.hashCode) +
(id.hashCode) +
(isTrashed == null ? 0 : isTrashed!.hashCode) +
(reason == null ? 0 : reason!.hashCode);
@override
String toString() => 'AssetBulkUploadCheckResult[action=$action, assetId=$assetId, id=$id, reason=$reason]';
String toString() => 'AssetBulkUploadCheckResult[action=$action, assetId=$assetId, id=$id, isTrashed=$isTrashed, reason=$reason]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -60,6 +71,11 @@ class AssetBulkUploadCheckResult {
// json[r'assetId'] = null;
}
json[r'id'] = this.id;
if (this.isTrashed != null) {
json[r'isTrashed'] = this.isTrashed;
} else {
// json[r'isTrashed'] = null;
}
if (this.reason != null) {
json[r'reason'] = this.reason;
} else {
@ -79,6 +95,7 @@ class AssetBulkUploadCheckResult {
action: AssetBulkUploadCheckResultActionEnum.fromJson(json[r'action'])!,
assetId: mapValueOfType<String>(json, r'assetId'),
id: mapValueOfType<String>(json, r'id')!,
isTrashed: mapValueOfType<bool>(json, r'isTrashed'),
reason: AssetBulkUploadCheckResultReasonEnum.fromJson(json[r'reason']),
);
}