fix: 修复锁分组添加、删除逻辑和UI显示错误问题

This commit is contained in:
Liuyf 2025-02-19 08:50:31 +08:00
parent bc34c36c13
commit cc008c7edc

View File

@ -18,7 +18,10 @@ class GroupEditLockLogic extends BaseGetXController {
var entity = await ApiRepository.to.lockGroupAddLock(
lockIds: lockIds, groupId: state.selectGroupListItem.keyGroupId!);
if (entity.errorCode!.codeIsSuccessful) {
eventBus.fire(LockGroupEditGroupLockRefreshEvent()); // 退
/*
TODO:eventbus连续发送两个事件get http或eventbus的问题
*/
eventBus.fire(LockGroupEditGroupLockRefreshEvent()); //
showToast('添加成功'.tr, something: () {
eventBus.fire(RefreshLockListInfoDataEvent());
Get.close(2);
@ -34,7 +37,7 @@ class GroupEditLockLogic extends BaseGetXController {
}
var entity = await ApiRepository.to.lockGroupDeletLock(lockIds: lockIds);
if (entity.errorCode!.codeIsSuccessful) {
eventBus.fire(LockGroupEditGroupLockRefreshEvent()); // 退
eventBus.fire(LockGroupEditGroupLockRefreshEvent()); //
showToast('删除成功'.tr, something: () {
eventBus.fire(RefreshLockListInfoDataEvent());
Get.close(2);