mirror of
https://github.com/immich-app/immich.git
synced 2026-05-22 23:12:32 -04:00
e142e3aca7
* feat(server): add ordering date option to time buckets * feat(web): add recently added page * feat(server): recently created assets in explore data * feat(web): recently added in explore tab * fix: recently added assets ordering * fix(server): failing bucket test * feat(web): improve recently added preview * chore: update e2e explore/timeline tests * chore: rename and refactor timeline ordering dates * fix(web): invalid timeline option * feat(mobile): recently added page * fix(server): sync tests * fix(mobile): resync assets to get uploadedAt column * chore: rename assetorderby enum * chore(mobile): formatting * minor fixes * stylings --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
34 lines
696 B
Dart
34 lines
696 B
Dart
enum GroupAssetsBy { day, month, auto, none }
|
|
|
|
enum HeaderType { none, month, day, monthAndDay }
|
|
|
|
enum SortAssetsBy { taken, uploaded }
|
|
|
|
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;
|
|
}
|