perf.为滑动选择干员增加容错操作

This commit is contained in:
MistEO
2021-11-01 23:30:41 +08:00
parent 92eb86bd97
commit a372a21acc
5 changed files with 97 additions and 54 deletions

View File

@@ -151,17 +151,23 @@ bool asst::InfrastReceptionTask::shift()
ctrler.click(add_analyzer.get_result().rect);
sleep(add_task_ptr->rear_delay);
swipe_to_the_left_of_operlist();
click_clear_button();
constexpr int retry_times = 1;
for (int i = 0; i <= retry_times; ++i) {
swipe_to_the_left_of_operlist();
click_clear_button();
opers_detect_with_swipe();
swipe_to_the_left_of_operlist();
optimal_calc();
opers_choose();
opers_detect_with_swipe();
swipe_to_the_left_of_operlist();
optimal_calc();
bool ret = opers_choose();
if (!ret) {
m_all_available_opers.clear();
continue;
}
break;
}
click_confirm_button();
return true;
}