mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
21af184045
* refactor: app metadata * refactor to per row store * cleanup * more test * review changes * more refactor * refactor * migrate primary color * migrate dynamic theme * migrate colorfulInterface * cleanup providers * migrate cleanup --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
49 lines
1.6 KiB
Dart
49 lines
1.6 KiB
Dart
import 'package:immich_mobile/constants/enums.dart';
|
|
|
|
class CleanupConfig {
|
|
final bool keepFavorites;
|
|
final AssetKeepType keepMediaType;
|
|
final List<String> keepAlbumIds;
|
|
final int cutoffDaysAgo;
|
|
final bool defaultsInitialized;
|
|
|
|
const CleanupConfig({
|
|
this.keepFavorites = true,
|
|
this.keepMediaType = AssetKeepType.none,
|
|
this.keepAlbumIds = const [],
|
|
this.cutoffDaysAgo = -1,
|
|
this.defaultsInitialized = false,
|
|
});
|
|
|
|
CleanupConfig copyWith({
|
|
bool? keepFavorites,
|
|
AssetKeepType? keepMediaType,
|
|
List<String>? keepAlbumIds,
|
|
int? cutoffDaysAgo,
|
|
bool? defaultsInitialized,
|
|
}) => .new(
|
|
keepFavorites: keepFavorites ?? this.keepFavorites,
|
|
keepMediaType: keepMediaType ?? this.keepMediaType,
|
|
keepAlbumIds: keepAlbumIds ?? this.keepAlbumIds,
|
|
cutoffDaysAgo: cutoffDaysAgo ?? this.cutoffDaysAgo,
|
|
defaultsInitialized: defaultsInitialized ?? this.defaultsInitialized,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is CleanupConfig &&
|
|
other.keepFavorites == keepFavorites &&
|
|
other.keepMediaType == keepMediaType &&
|
|
other.keepAlbumIds == keepAlbumIds &&
|
|
other.cutoffDaysAgo == cutoffDaysAgo &&
|
|
other.defaultsInitialized == defaultsInitialized);
|
|
|
|
@override
|
|
int get hashCode => Object.hash(keepFavorites, keepMediaType, keepAlbumIds, cutoffDaysAgo, defaultsInitialized);
|
|
|
|
@override
|
|
String toString() =>
|
|
'CleanupConfig(keepFavorites: $keepFavorites, keepMediaType: $keepMediaType, keepAlbumIds: $keepAlbumIds, cutoffDaysAgo: $cutoffDaysAgo, defaultsInitialized: $defaultsInitialized)';
|
|
}
|