mirror of
https://github.com/immich-app/immich.git
synced 2026-07-28 22:51:21 -07:00
* feat(mobile): custom date range for map * refactor: rename timerange & remove isvalid * refactor: rename customtimerange variables * refactor: add back setRelativeTime * refactor: implement suggestions * refactor: suggestions * fix: ifPresent * fix: context.locale * chore: restrict selection * refactor: move options to mapconfig * refactor: move model to domain * chore: locale toLanguageTag * add map codec tests * rebase --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
16 lines
404 B
Dart
16 lines
404 B
Dart
import 'package:immich_mobile/utils/option.dart';
|
|
|
|
class TimeRange {
|
|
final DateTime? from;
|
|
final DateTime? to;
|
|
|
|
const TimeRange({this.from, this.to});
|
|
|
|
TimeRange copyWith({Option<DateTime>? from, Option<DateTime>? to}) {
|
|
return TimeRange(from: from.patch(this.from), to: to.patch(this.to));
|
|
}
|
|
|
|
TimeRange clearFrom() => TimeRange(to: to);
|
|
TimeRange clearTo() => TimeRange(from: from);
|
|
}
|