refactor: Store and fix missing persistence of some values
This commit is contained in:
parent
c10fe91636
commit
c9c2620ad4
12 changed files with 120 additions and 165 deletions
|
|
@ -30,13 +30,13 @@ class SettingsStyleController extends State<SettingsStyle> {
|
|||
if (pickedFile == null) return;
|
||||
await Matrix.of(context)
|
||||
.store
|
||||
.setItem(SettingKeys.wallpaper, pickedFile.path);
|
||||
.setString(SettingKeys.wallpaper, pickedFile.path!);
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void deleteWallpaperAction() async {
|
||||
Matrix.of(context).wallpaper = null;
|
||||
await Matrix.of(context).store.deleteItem(SettingKeys.wallpaper);
|
||||
await Matrix.of(context).store.remove(SettingKeys.wallpaper);
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ class SettingsStyleController extends State<SettingsStyle> {
|
|||
|
||||
void changeFontSizeFactor(double d) {
|
||||
setState(() => AppConfig.fontSizeFactor = d);
|
||||
Matrix.of(context).store.setItem(
|
||||
Matrix.of(context).store.setString(
|
||||
SettingKeys.fontSizeFactor,
|
||||
AppConfig.fontSizeFactor.toString(),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue