fix(task): 尝试修复快速截图下无法处理网络连接错误弹窗

This commit is contained in:
XcantloadX 2025-04-06 20:28:24 +08:00
parent ff4ed66f85
commit a18d93d143
1 changed files with 4 additions and 2 deletions

View File

@ -237,9 +237,11 @@ def acquisitions() -> AcquisitionType | None:
# 网络中断弹窗
logger.debug("Check network error popup...")
if image.find(R.Common.TextNetworkError):
if (image.find(R.Common.TextNetworkError)
and (btn_retry := image.find(R.Common.ButtonRetry))
):
logger.info("Network error popup found")
device.click(image.expect(R.Common.ButtonRetry))
device.click(btn_retry)
return "NetworkError"
# 跳过未读交流
logger.debug("Check skip commu...")