mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
optimize, refactor code
remove redundant code and checking getTrashedAssetsForAlbum for iOS tests for hash trashed assets
This commit is contained in:
parent
3839e72028
commit
3eb2bf0342
24 changed files with 393 additions and 793 deletions
|
|
@ -1,12 +1,10 @@
|
|||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
|
||||
class TrashedAsset extends LocalAsset {
|
||||
final String? volume;
|
||||
final String albumId;
|
||||
|
||||
const TrashedAsset({
|
||||
required this.albumId,
|
||||
this.volume,
|
||||
required super.id,
|
||||
super.remoteId,
|
||||
required super.name,
|
||||
|
|
@ -38,7 +36,6 @@ class TrashedAsset extends LocalAsset {
|
|||
String? livePhotoVideoId,
|
||||
int? orientation,
|
||||
String? albumId,
|
||||
String? volume,
|
||||
}) {
|
||||
return TrashedAsset(
|
||||
id: id ?? this.id,
|
||||
|
|
@ -55,7 +52,6 @@ class TrashedAsset extends LocalAsset {
|
|||
livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId,
|
||||
orientation: orientation ?? this.orientation,
|
||||
albumId: albumId ?? this.albumId,
|
||||
volume: volume ?? this.volume,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +75,6 @@ class TrashedAsset extends LocalAsset {
|
|||
livePhotoVideoId == other.livePhotoVideoId &&
|
||||
orientation == other.orientation &&
|
||||
// TrashedAsset extras
|
||||
volume == other.volume &&
|
||||
albumId == other.albumId;
|
||||
|
||||
@override
|
||||
|
|
@ -97,7 +92,6 @@ class TrashedAsset extends LocalAsset {
|
|||
isFavorite,
|
||||
livePhotoVideoId,
|
||||
orientation,
|
||||
volume,
|
||||
albumId,
|
||||
);
|
||||
|
||||
|
|
@ -118,7 +112,6 @@ class TrashedAsset extends LocalAsset {
|
|||
'livePhotoVideoId: $livePhotoVideoId, '
|
||||
'orientation: $orientation, '
|
||||
'albumId: $albumId, '
|
||||
'volume: $volume'
|
||||
')';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue