Better side navigation

🐛 Bug fixes and optimizations
This commit is contained in:
2024-09-13 20:22:10 +08:00
parent dd01f964d4
commit b449735bf5
33 changed files with 212 additions and 182 deletions

View File

@ -155,13 +155,14 @@ class PostEditorController extends GetxController {
);
}
void localRead() {
SharedPreferences.getInstance().then((inst) {
if (inst.containsKey('post_editor_local_save')) {
isRestoreFromLocal.value = true;
payload = jsonDecode(inst.getString('post_editor_local_save')!);
}
});
Future<bool> localRead() async {
final inst = await SharedPreferences.getInstance();
if (inst.containsKey('post_editor_local_save')) {
isRestoreFromLocal.value = true;
payload = jsonDecode(inst.getString('post_editor_local_save')!);
return true;
}
return false;
}
void localClear() {