fix:修复删除设备,设备列表没有刷新
This commit is contained in:
parent
f1fd311bf5
commit
f44c86a512
@ -509,6 +509,7 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 下级界面修改成功后传递数据
|
// 下级界面修改成功后传递数据
|
||||||
StreamSubscription? _passCurrentLockInformationEvent;
|
StreamSubscription? _passCurrentLockInformationEvent;
|
||||||
|
|
||||||
void initLoadDataAction(BlockSetStateCallback blockSetStateCallback) {
|
void initLoadDataAction(BlockSetStateCallback blockSetStateCallback) {
|
||||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||||
_passCurrentLockInformationEvent = eventBus
|
_passCurrentLockInformationEvent = eventBus
|
||||||
@ -567,18 +568,19 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
BlueManage().connectDeviceMacAddress = '';
|
BlueManage().connectDeviceMacAddress = '';
|
||||||
|
final bool isXHJ = F.isXHJ;
|
||||||
|
final bool isOnlyOneData = state.isOnlyOneData.value == true;
|
||||||
|
await Future<dynamic>.delayed(const Duration(milliseconds: 200))
|
||||||
|
.then((e) {
|
||||||
|
if (isXHJ) {
|
||||||
|
Get.close(3);
|
||||||
|
} else {
|
||||||
|
Get.close(isOnlyOneData ? 1 : 2);
|
||||||
|
}
|
||||||
|
});
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||||
});
|
});
|
||||||
if (state.isOnlyOneData.value == true) {
|
|
||||||
Future<dynamic>.delayed(const Duration(milliseconds: 200)).then((e) {
|
|
||||||
Get.close(1);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Future<dynamic>.delayed(const Duration(milliseconds: 200)).then((e) {
|
|
||||||
Get.close(2);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -591,12 +593,10 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
state.deleteAdministratorIsHaveAllData.value == true ? 1 : 0);
|
state.deleteAdministratorIsHaveAllData.value == true ? 1 : 0);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
BlueManage().connectDeviceMacAddress = '';
|
BlueManage().connectDeviceMacAddress = '';
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
|
||||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
|
||||||
});
|
|
||||||
final bool isXHJ = F.isXHJ;
|
final bool isXHJ = F.isXHJ;
|
||||||
final bool isOnlyOneData = state.isOnlyOneData.value == true;
|
final bool isOnlyOneData = state.isOnlyOneData.value == true;
|
||||||
Future<dynamic>.delayed(const Duration(milliseconds: 200)).then((e) {
|
await Future<dynamic>.delayed(const Duration(milliseconds: 200)).then((e) {
|
||||||
if (isXHJ) {
|
if (isXHJ) {
|
||||||
Get.close(3);
|
Get.close(3);
|
||||||
} else {
|
} else {
|
||||||
@ -604,6 +604,9 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
Get.close(onlyOneDataInt);
|
Get.close(onlyOneDataInt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||||
|
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user