mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
41 lines
667 B
Dart
41 lines
667 B
Dart
|
|
enum GroupAssetsBy {
|
||
|
|
day,
|
||
|
|
month,
|
||
|
|
none;
|
||
|
|
}
|
||
|
|
|
||
|
|
enum HeaderType {
|
||
|
|
none,
|
||
|
|
month,
|
||
|
|
day,
|
||
|
|
monthAndDay;
|
||
|
|
}
|
||
|
|
|
||
|
|
class Bucket {
|
||
|
|
final int assetCount;
|
||
|
|
|
||
|
|
const Bucket({required this.assetCount});
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(covariant Bucket other) {
|
||
|
|
return assetCount == other.assetCount;
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
int get hashCode => assetCount.hashCode;
|
||
|
|
}
|
||
|
|
|
||
|
|
class TimeBucket extends Bucket {
|
||
|
|
final DateTime date;
|
||
|
|
|
||
|
|
const TimeBucket({required this.date, required super.assetCount});
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(covariant TimeBucket other) {
|
||
|
|
return super == other && date == other.date;
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
int get hashCode => super.hashCode ^ date.hashCode;
|
||
|
|
}
|