diff --git a/lan/lan_en.json b/lan/lan_en.json index 34252675..ad4a5cfa 100644 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -1128,6 +1128,7 @@ "正在说话...": "Talking now...", "设备不在线": "The device is not online", "设备未配网": "The device is not connected to the network", + "已静音": "The sound has been turned off", "该锁的远程开锁功能未启用": "The remote unlocking function of this lock is not enabled", "下载完成,请到相册查看": "Download completed, please go to the album to view", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "After reset, the remote control of the lock will be deleted. Do you want to reset it?", diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 06bf63be..8e3c1d4f 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -1129,6 +1129,7 @@ "正在说话...": "正在说话...", "设备不在线": "设备不在线", "设备未配网": "设备未配网", + "已静音": "已静音", "该锁的远程开锁功能未启用": "该锁的远程开锁功能未启用", "下载完成,请到相册查看": "下载完成,请到相册查看", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?", diff --git a/lan/lan_zh.json b/lan/lan_zh.json index e0770c09..29eda655 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -1129,6 +1129,7 @@ "正在说话...": "正在说话...", "设备不在线": "设备不在线", "设备未配网": "设备未配网", + "已静音": "已静音", "该锁的远程开锁功能未启用": "该锁的远程开锁功能未启用", "下载完成,请到相册查看": "下载完成,请到相册查看", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?", diff --git a/lib/talk/starChart/views/talkView/talk_view_logic.dart b/lib/talk/starChart/views/talkView/talk_view_logic.dart index f2b4081a..77619e21 100644 --- a/lib/talk/starChart/views/talkView/talk_view_logic.dart +++ b/lib/talk/starChart/views/talkView/talk_view_logic.dart @@ -509,20 +509,18 @@ class TalkViewLogic extends BaseGetXController { Future remoteOpenLock() async { final lockPeerId = StartChartManage().lockPeerId; final lockListPeerId = StartChartManage().lockListPeerId; - int lockId = 0; + int lockId = lockDetailState.keyInfos.value.lockId ?? 0; if (lockListPeerId.length == 0) { // 如果锁列表没有获取到peerId,代表只有一个锁,直接使用锁详情的lockId lockId = lockDetailState.keyInfos.value.lockId ?? 0; } else { // 如果锁列表获取到peerId,代表有多个锁,使用锁列表的peerId // 从列表中遍历出对应的peerId - lockId = lockListPeerId - .firstWhere( - (element) => element.network?.peerId == lockPeerId, - orElse: () => LockListInfoItemEntity(), // 如果没有找到,返回 null - ) - ?.lockId ?? - 0; + lockListPeerId.forEach((element) { + if (element.network?.peerId == lockPeerId) { + lockId = element.lockId ?? 0; + } + }); } final LockSetInfoEntity lockSetInfoEntity = await ApiRepository.to.getLockSettingInfoData(