mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Upd: limit load_rows interval to 1 second & not load at first iteration
This commit is contained in:
parent
c0c3218389
commit
8c38c05696
@ -207,12 +207,20 @@ class DraggableList:
|
||||
logger.info(f'Select row: {row}')
|
||||
skip_first_screenshot = True
|
||||
interval = Timer(5)
|
||||
skip_first_load_rows = True
|
||||
load_rows_interval = Timer(1)
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
main.device.screenshot()
|
||||
self.load_rows(main=main)
|
||||
|
||||
if skip_first_load_rows:
|
||||
skip_first_load_rows = False
|
||||
else:
|
||||
if load_rows_interval.reached():
|
||||
self.load_rows(main=main)
|
||||
load_rows_interval.reset()
|
||||
|
||||
button = self.keyword2button(row)
|
||||
if not button:
|
||||
|
Loading…
Reference in New Issue
Block a user