refactor: reorganize and rename settings (#1307)

Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
Co-authored-by: Ushie <ushiekane@gmail.com>
This commit is contained in:
KobeW50 2023-10-15 05:56:02 -04:00 committed by GitHub
parent e960fcc303
commit 196d9fe4d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 285 additions and 271 deletions

View file

@ -244,12 +244,12 @@ class ManagerAPI {
await _prefs.setBool('universalPatchesEnabled', value);
}
bool areExperimentalPatchesEnabled() {
return _prefs.getBool('experimentalPatchesEnabled') ?? false;
bool isVersionCompatibilityCheckEnabled() {
return _prefs.getBool('versionCompatibilityCheckEnabled') ?? true;
}
Future<void> enableExperimentalPatchesStatus(bool value) async {
await _prefs.setBool('experimentalPatchesEnabled', value);
Future<void> enableVersionCompatibilityCheckStatus(bool value) async {
await _prefs.setBool('versionCompatibilityCheckEnabled', value);
}
Future<void> setKeystorePassword(String password) async {
@ -677,7 +677,7 @@ class ManagerAPI {
Future<List<String>> getDefaultPatches() async {
final List<Patch> patches = await getPatches();
final List<String> defaultPatches = [];
if (areExperimentalPatchesEnabled() == false) {
if (isVersionCompatibilityCheckEnabled() == false) {
defaultPatches.addAll(
patches
.where(