fix:修复电量更新被忽略的 bus
This commit is contained in:
parent
4213ad2d86
commit
99b7a443ed
@ -468,8 +468,14 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
Storage.setString(saveLockAlias, state.lockAlias.value);
|
Storage.setString(saveLockAlias, state.lockAlias.value);
|
||||||
} else if (event.type == 4) {
|
} else if (event.type == 4) {
|
||||||
// 4 更新了电量
|
// 4 更新了电量
|
||||||
state.electricQuantity.value = int.parse(event.setResult);
|
// state.electricQuantity.value = int.parse(event.setResult);
|
||||||
state.keyInfos.value.electricQuantity = int.parse(event.setResult);
|
// state.keyInfos.value.electricQuantity = int.parse(event.setResult);
|
||||||
|
final int electricQuantity =
|
||||||
|
int.tryParse(event.setResult['electricQuantity']) ?? 0;
|
||||||
|
state.electricQuantity.value =electricQuantity;
|
||||||
|
state.keyInfos.value.electricQuantity = electricQuantity;
|
||||||
|
state.keyInfos.value.electricQuantityDate =
|
||||||
|
event.setResult['uploadElectricQuantityDate'];
|
||||||
} else if (event.type == 5) {
|
} else if (event.type == 5) {
|
||||||
// 5 远程开锁
|
// 5 远程开锁
|
||||||
state.keyInfos.value.lockSetting!.remoteUnlock =
|
state.keyInfos.value.lockSetting!.remoteUnlock =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user