From bee794e80148421b6e52c485a025d9048e12027e Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 19 Feb 2025 16:36:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E5=BC=80=E9=94=81=E5=89=8D=EF=BC=8C=E5=92=8C=E7=9B=91=E8=A7=86?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=9D=99=E9=9F=B3=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lan/lan_en.json | 1 + lan/lan_keys.json | 1 + lan/lan_zh.json | 1 + .../starChart/views/talkView/talk_view_logic.dart | 14 ++++++-------- 4 files changed, 9 insertions(+), 8 deletions(-) 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(