Add memory limit option

This commit is contained in:
problematicconsumer
2023-10-26 15:16:25 +03:30
parent f85163476d
commit ab4e6f8b77
14 changed files with 90 additions and 27 deletions

View File

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