fix:修复极光推送 ios 报错的问题

This commit is contained in:
anfe 2024-06-18 17:51:17 +08:00
parent 2f248c74b2
commit f23e2390c5
3 changed files with 9 additions and 10 deletions

BIN
ios/.DS_Store vendored

Binary file not shown.

View File

@ -36,7 +36,7 @@ class LockMainLogic extends BaseGetXController {
isUnShowLoading: isUnShowLoading,
);
if (entity.errorCode!.codeIsSuccessful) {
await loadMainDataLogic(entity.data!);
await loadMainDataLogic(entity.data!);
}
return entity;
}
@ -149,7 +149,8 @@ class LockMainLogic extends BaseGetXController {
final LockListInfoEntity entity = await ApiRepository.to.getStarLockInfo(
keyId: keyId,
);
if (entity.errorCode!.codeIsSuccessful) {
if (entity.errorCode!.codeIsSuccessful &&
(entity.data?.groupList ?? <GroupList>[]).isNotEmpty) {
state.lockListInfoGroupEntity.value.groupList ??= <GroupList>[];
final GroupList list = entity.data!.groupList!.first;
final LockListInfoItemEntity listItem =

View File

@ -74,15 +74,13 @@ class MessageManagement {
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));
}
//
// final Map<Object?, Object?> extra = data['updateFieldList'];
// if (extra['appUnlockOnline'] != null) {
// final String appUnlockOnline = extra['appUnlockOnline']!.toString();
// }
eventBus.fire(RefreshLockInfoDataEvent(keyId: keyId, lockId: lockId));
break;
default:
throw Exception('无法识别eventNo 参数:$eventNo');
}