1,修复超级管理员用户改变锁设置,授权管理员和普通用户未更新问题

2,新增自定义消息--锁设置变更类型及相应逻辑处理
3,开锁页-设置-开锁时是否需联网 设置开关返回开锁页的标志未刷新。另授权和普通用户标志和使用没实时更新,会出现设置了不生效的情况。问题修复
4,修复bugID:ID1002246
This commit is contained in:
Daisy 2024-06-17 17:16:59 +08:00
parent 5de9d05914
commit fa06dc6837
3 changed files with 17 additions and 2 deletions

View File

@ -68,6 +68,7 @@ class _LockDetailPageState extends State<LockDetailPage>
///
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
state.isOpenLockNeedOnline.refresh();
}
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
@ -777,7 +778,7 @@ class _LockDetailPageState extends State<LockDetailPage>
child: Image.asset('images/main/icon_lockDetail_needNetwork.png',
width: 24.w,
height: 20.w,
color: state.keyInfos.value.appUnlockOnline == 1
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
@ -786,7 +787,7 @@ class _LockDetailPageState extends State<LockDetailPage>
'手机需联网',
style: TextStyle(
fontSize: 20.sp,
color: state.keyInfos.value.appUnlockOnline == 1
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),

View File

@ -7,4 +7,6 @@ class MessageConstant {
static const int lockReceive = 30;
//+
static const int keyReceive = 40;
//
static const int lockSetChange = 50;
}

View File

@ -71,6 +71,18 @@ class MessageManagement {
final int lockId = data['lockId'];
eventBus.fire(RogerThatLockInfoDataEvent(keyId: keyId, lockId: lockId));
break;
case MessageConstant.lockSetChange:
final int keyId = data['keyId'];
final int lockId = data['lockId'];
final Map<String, dynamic> extra = data['updateFieldList'];
if (extra['appUnlockOnline'] != null) {
final String appUnlockOnline = extra['appUnlockOnline'];
eventBus.fire(
LockSetChangeSetRefreshLockDetailWithType(1, appUnlockOnline));
eventBus.fire(RefreshLockInfoDataEvent(keyId: keyId, lockId: lockId));
}
break;
default:
throw Exception('无法识别eventNo 参数:$eventNo');
}