mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 13:25:13 +00:00
fix(cafe): improve stability of closing reward window
This commit is contained in:
parent
8fe8ed5f86
commit
f669130e33
@ -63,8 +63,9 @@ class Cafe(CafeUI):
|
||||
self.click_with_interval(GET_REWARD)
|
||||
case CafeStatus.GOT:
|
||||
logger.info('Cafe reward have been got')
|
||||
self.appear_then_click(GET_REWARD_CLOSE)
|
||||
if not self.appear(GET_REWARD_CLOSE):
|
||||
if self.appear(GET_REWARD_CLOSE):
|
||||
self.click_with_interval(GET_REWARD_CLOSE, 1)
|
||||
return status
|
||||
return CafeStatus.INVITATION
|
||||
case CafeStatus.INVITATION:
|
||||
if handle_invitation(self):
|
||||
@ -77,6 +78,8 @@ class Cafe(CafeUI):
|
||||
return CafeStatus.CHECK
|
||||
self.click_with_interval(buttons[0], interval=1)
|
||||
case CafeStatus.CHECK:
|
||||
if self.appear_then_click(GET_REWARD_CLOSE):
|
||||
return status
|
||||
buttons = self.get_clickable_buttons()
|
||||
if not self.is_adjust_on:
|
||||
if not buttons:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user