Skip to content

Commit

Permalink
fix 优化while循环
Browse files Browse the repository at this point in the history
  • Loading branch information
gallonyin committed Mar 2, 2023
1 parent 4ef59c4 commit 938ca05
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@ object WeworkLoopImpl {
} else {
LogUtils.d("该图片已下载 忽略")
}
while (WeworkController.weworkService.currentClass == "com.tencent.wework.msg.controller.ShowImageController") {
var retry = 3
while (retry-- > 0 && WeworkController.weworkService.currentClass == "com.tencent.wework.msg.controller.ShowImageController") {
AccessibilityUtil.performXYClick(WeworkController.weworkService, ScreenUtils.getScreenWidth() / 2F, BarUtils.getStatusBarHeight() * 2F)
sleep(Constant.POP_WINDOW_INTERVAL)
}
Expand Down

0 comments on commit 938ca05

Please sign in to comment.