mirror of
https://github.com/BlueBubblesApp/bluebubbles-app.git
synced 2025-08-06 19:44:08 +08:00
more granular settings saves
This commit is contained in:
@ -54,14 +54,14 @@ class _ProfilePanelState extends OptimizedState<ProfilePanel> with WidgetsBindin
|
||||
|
||||
void updateName() async {
|
||||
final nameController = TextEditingController(text: ss.settings.userName.value);
|
||||
done() {
|
||||
done() async {
|
||||
if (nameController.text.isEmpty) {
|
||||
showSnackbar("Error", "Enter a name!");
|
||||
return;
|
||||
}
|
||||
Get.back();
|
||||
ss.settings.userName.value = nameController.text;
|
||||
ss.settings.save();
|
||||
await ss.settings.saveOne("userName");
|
||||
setState(() {});
|
||||
}
|
||||
await showDialog(
|
||||
|
@ -702,7 +702,8 @@ class _ServerManagementPanelState extends CustomState<ServerManagementPanel, voi
|
||||
} else {
|
||||
ss.settings.localhostPort.value = null;
|
||||
}
|
||||
ss.settings.save();
|
||||
|
||||
await ss.settings.saveOne('localhostPort');
|
||||
if (ss.settings.localhostPort.value == null) {
|
||||
http.originOverride = null;
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@ class _AvatarCropState extends OptimizedState<AvatarCrop> {
|
||||
}
|
||||
await file.writeAsBytes(croppedData);
|
||||
ss.settings.userAvatarPath.value = file.path;
|
||||
ss.settings.save();
|
||||
await ss.settings.saveOne("userAvatarPath");
|
||||
Get.back();
|
||||
Navigator.of(context).pop();
|
||||
showSnackbar("Notice", "User avatar saved successfully");
|
||||
|
Reference in New Issue
Block a user