Browse Source

fix 001

devab
MTing 4 weeks ago
parent
commit
bd8cea1959
  1. 16
      app/src/main/java/com/ouxuan/oxface/device/GateABController.java

16
app/src/main/java/com/ouxuan/oxface/device/GateABController.java

@ -1054,6 +1054,22 @@ public class GateABController {
notifyGateStateListener(true, false); // 处理弹窗显示
}, 100);
}
// 新增逻辑当检测到A门或B门开启时如果没有不可用弹窗显示则需要显示不可用弹窗
else if ((currentGateState.gateAOpen || currentGateState.gateBOpen) && !shouldShowDialog) {
LogManager.logInfo(TAG, "检测到A门或B门开启,当前没有不可用弹窗,需要显示不可用弹窗");
// 检查是否有监听器并且是GateUnavailableListener类型
if (gateStateListener instanceof GateUnavailableListener) {
final String reason = currentGateState.getUnavailableReason();
syncHandler.post(() -> {
GateUnavailableListener unavailableListener = (GateUnavailableListener) gateStateListener;
// 触发门禁不可用回调
unavailableListener.onGateUnavailable(reason);
// 同时更新门状态显示
unavailableListener.onGateStatusUpdate(gateAOpen, gateBOpen, udpConnected);
});
}
}
// 处理其他状态变化非弹窗显示场景
if (stateChanged && gateStateListener != null && !shouldShowDialog) {

Loading…
Cancel
Save