Refactor app update

This commit is contained in:
problematicconsumer
2023-09-20 22:38:38 +03:30
parent 59365653b8
commit 8958c72fe6
11 changed files with 210 additions and 23 deletions

View File

@@ -74,6 +74,23 @@ class EnableAnalytics extends _$EnableAnalytics {
}
}
@Riverpod(keepAlive: true)
class CheckForPreReleaseUpdates extends _$CheckForPreReleaseUpdates {
late final _pref = Pref(
ref.watch(sharedPreferencesProvider),
"check_for_pre_release_updates",
true,
);
@override
bool build() => _pref.getValue();
Future<void> update(bool value) {
state = value;
return _pref.update(value);
}
}
@Riverpod(keepAlive: true)
class DebugModeNotifier extends _$DebugModeNotifier {
late final _pref = Pref(