diff --git a/mobile/lib/domain/models/config/map_config.dart b/mobile/lib/domain/models/config/map_config.dart index e37ab0f431..20d3466b1d 100644 --- a/mobile/lib/domain/models/config/map_config.dart +++ b/mobile/lib/domain/models/config/map_config.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:immich_mobile/utils/option.dart'; class MapConfig { final int relativeDays; @@ -6,6 +7,8 @@ class MapConfig { final bool includeArchived; final ThemeMode themeMode; final bool withPartners; + final Option customFrom; + final Option customTo; const MapConfig({ this.relativeDays = 0, @@ -13,6 +16,8 @@ class MapConfig { this.includeArchived = false, this.themeMode = ThemeMode.system, this.withPartners = false, + this.customFrom = const Option.none(), + this.customTo = const Option.none(), }); MapConfig copyWith({ @@ -21,12 +26,16 @@ class MapConfig { bool? includeArchived, ThemeMode? themeMode, bool? withPartners, + Option? customFrom, + Option? customTo, }) => MapConfig( relativeDays: relativeDays ?? this.relativeDays, favoritesOnly: favoritesOnly ?? this.favoritesOnly, includeArchived: includeArchived ?? this.includeArchived, themeMode: themeMode ?? this.themeMode, withPartners: withPartners ?? this.withPartners, + customFrom: customFrom ?? this.customFrom, + customTo: customTo ?? this.customTo, ); @override @@ -37,12 +46,15 @@ class MapConfig { other.favoritesOnly == favoritesOnly && other.includeArchived == includeArchived && other.themeMode == themeMode && - other.withPartners == withPartners); + other.withPartners == withPartners && + other.customFrom == customFrom && + other.customTo == customTo); @override - int get hashCode => Object.hash(relativeDays, favoritesOnly, includeArchived, themeMode, withPartners); + int get hashCode => + Object.hash(relativeDays, favoritesOnly, includeArchived, themeMode, withPartners, customFrom, customTo); @override String toString() => - 'MapConfig(relativeDays: $relativeDays, favoritesOnly: $favoritesOnly, includeArchived: $includeArchived, themeMode: $themeMode, withPartners: $withPartners)'; + 'MapConfig(relativeDays: $relativeDays, favoritesOnly: $favoritesOnly, includeArchived: $includeArchived, themeMode: $themeMode, withPartners: $withPartners, customFrom: $customFrom, customTo: $customTo)'; } diff --git a/mobile/lib/domain/models/metadata_key.dart b/mobile/lib/domain/models/metadata_key.dart index 61a3cebc8a..29df5e7838 100644 --- a/mobile/lib/domain/models/metadata_key.dart +++ b/mobile/lib/domain/models/metadata_key.dart @@ -50,6 +50,8 @@ enum MetadataKey { // Map mapShowFavoriteOnly(.appConfig, 'map.showFavoriteOnly', false), mapRelativeDate(.appConfig, 'map.relativeDate', 0), + mapCustomFrom(.appConfig, 'map.customFrom', ''), + mapCustomTo(.appConfig, 'map.customTo', ''), mapIncludeArchived(.appConfig, 'map.includeArchived', false), mapThemeMode(.appConfig, 'map.themeMode', .system, _EnumCodec(ThemeMode.values)), mapWithPartners(.appConfig, 'map.withPartners', false), diff --git a/mobile/lib/domain/models/store.model.dart b/mobile/lib/domain/models/store.model.dart index cae99834bf..e52e8a0a92 100644 --- a/mobile/lib/domain/models/store.model.dart +++ b/mobile/lib/domain/models/store.model.dart @@ -40,10 +40,6 @@ enum StoreKey { albumGridView._(140), loadOriginal._(101), - // Map custom time range settings - mapCustomFrom._(142), - mapCustomTo._(143), - // Experimental stuff enableBackup._(1003), useWifiForUploadVideos._(1004),