mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: move map config to metadata table (#28226)
* 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 * migrate mapconfig --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -1,22 +1,25 @@
|
||||
import 'package:immich_mobile/domain/models/config/cleanup_config.dart';
|
||||
import 'package:immich_mobile/domain/models/config/map_config.dart';
|
||||
import 'package:immich_mobile/domain/models/config/theme_config.dart';
|
||||
|
||||
class AppConfig {
|
||||
final ThemeConfig theme;
|
||||
final CleanupConfig cleanup;
|
||||
final MapConfig map;
|
||||
|
||||
const AppConfig({this.theme = const .new(), this.cleanup = const .new()});
|
||||
const AppConfig({this.theme = const .new(), this.cleanup = const .new(), this.map = const .new()});
|
||||
|
||||
AppConfig copyWith({ThemeConfig? theme, CleanupConfig? cleanup}) =>
|
||||
.new(theme: theme ?? this.theme, cleanup: cleanup ?? this.cleanup);
|
||||
AppConfig copyWith({ThemeConfig? theme, CleanupConfig? cleanup, MapConfig? map}) =>
|
||||
.new(theme: theme ?? this.theme, cleanup: cleanup ?? this.cleanup, map: map ?? this.map);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) || (other is AppConfig && other.theme == theme && other.cleanup == cleanup);
|
||||
identical(this, other) ||
|
||||
(other is AppConfig && other.theme == theme && other.cleanup == cleanup && other.map == map);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(theme, cleanup);
|
||||
int get hashCode => Object.hash(theme, cleanup, map);
|
||||
|
||||
@override
|
||||
String toString() => 'AppConfig(theme: $theme, cleanup: $cleanup)';
|
||||
String toString() => 'AppConfig(theme: $theme, cleanup: $cleanup, map: $map)';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user