refactor: move cleanup config to metadata table (#28225)

* 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

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-05-07 23:27:06 +07:00
committed by GitHub
parent 1fcc2b704b
commit 21af184045
11 changed files with 181 additions and 61 deletions
@@ -1,18 +1,22 @@
import 'package:immich_mobile/domain/models/config/cleanup_config.dart';
import 'package:immich_mobile/domain/models/config/theme_config.dart';
class AppConfig {
final ThemeConfig theme;
final CleanupConfig cleanup;
const AppConfig({this.theme = const ThemeConfig()});
const AppConfig({this.theme = const .new(), this.cleanup = const .new()});
AppConfig copyWith({ThemeConfig? theme}) => .new(theme: theme ?? this.theme);
AppConfig copyWith({ThemeConfig? theme, CleanupConfig? cleanup}) =>
.new(theme: theme ?? this.theme, cleanup: cleanup ?? this.cleanup);
@override
bool operator ==(Object other) => identical(this, other) || (other is AppConfig && other.theme == theme);
bool operator ==(Object other) =>
identical(this, other) || (other is AppConfig && other.theme == theme && other.cleanup == cleanup);
@override
int get hashCode => theme.hashCode;
int get hashCode => Object.hash(theme, cleanup);
@override
String toString() => 'AppConfig(theme: $theme)';
String toString() => 'AppConfig(theme: $theme, cleanup: $cleanup)';
}