functional datastructure. Needs to be able to write to storage as well
Some checks failed
Build and push docker image / Build (pull_request) Failing after 3m5s
Build and release APK / Build APK (pull_request) Successful in 7m24s
Build web / Build Web (pull_request) Successful in 3m36s

This commit is contained in:
2024-06-21 19:30:40 +02:00
parent 9a5ae95d97
commit db41528702
18 changed files with 346 additions and 210 deletions

View File

@@ -67,16 +67,16 @@ class UserPreferences {
void save() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
SharedPreferences sharedPrefs = await SharedPreferences.getInstance();
for (SinglePreference pref in preferences) {
prefs.setInt(pref.key, pref.value);
sharedPrefs.setInt(pref.key, pref.value);
}
}
void load() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
SharedPreferences sharedPrefs = await SharedPreferences.getInstance();
for (SinglePreference pref in preferences) {
pref.value = prefs.getInt(pref.key) ?? 0;
pref.value = sharedPrefs.getInt(pref.key) ?? 0;
}
}
}