更新初次设置消息失败
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/component/base/GradientSwitch.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/message/common_message_setting_controller.dart';
|
||||
import 'package:vbvs_app/controller/message/message_setting_controller.dart';
|
||||
@@ -181,6 +182,8 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
||||
if (datalist['device_type_setting'] != null) {
|
||||
messageSettingController.model.device_type_setting =
|
||||
datalist['device_type_setting'];
|
||||
} else {
|
||||
messageSettingController.model.device_type_setting.clear();
|
||||
}
|
||||
messageSettingController.updateAll();
|
||||
}
|
||||
@@ -325,9 +328,15 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
||||
data: data,
|
||||
onSuccess: (res) {
|
||||
_fetchDeviceMessageSetting();
|
||||
messageSettingController
|
||||
.updateAll();
|
||||
});
|
||||
messageSettingController.updateAll();
|
||||
},
|
||||
onFailure: (res) {
|
||||
NewTopSlideNotification.show(
|
||||
text: '操作失败'.tr,
|
||||
textColor: themeController
|
||||
.currentColor.sc9);
|
||||
},
|
||||
);
|
||||
},
|
||||
activeGradient: LinearGradient(
|
||||
colors: [
|
||||
|
||||
Reference in New Issue
Block a user