From b28ffcc13e59fe94250ae1c11acf6e259cfb91d1 Mon Sep 17 00:00:00 2001 From: Weiyou Wang <44151844+Alan-Charred@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:22:44 +1100 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A6=81=E6=B1=82=E6=AF=8F=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=9F=BA=E5=BB=BA=E5=AE=BF=E8=88=8D=E5=90=8E?= =?UTF-8?q?=E9=83=BD=E9=87=8D=E6=96=B0=E9=80=89=E6=8B=A9=E4=B8=80=E9=81=8D?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=20(#10968)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 要求每次进入基建宿舍后都重新选择一遍筛选条件 * chore: Auto update by pre-commit hooks * fix: 修复死循环,替换为只执行一遍 Co-authored-by: status102 <102887808+status102@users.noreply.github.com> * refactor: 加个 log,未来用于检测 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: status102 <102887808+status102@users.noreply.github.com> --- src/MaaCore/Task/Infrast/InfrastDormTask.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp index e1e6533c32..9b6d2ecdc0 100644 --- a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp @@ -50,10 +50,13 @@ bool asst::InfrastDormTask::_run() } Log.trace("m_dorm_notstationed_enabled:", m_dorm_notstationed_enabled); - if (m_dorm_notstationed_enabled && !m_if_filter_notstationed_haspressed) { + if (m_dorm_notstationed_enabled) { Log.trace("click_filter_menu_not_stationed_button"); - click_filter_menu_not_stationed_button(); - m_if_filter_notstationed_haspressed = true; + // 在此处不进行 m_if_filter_notstationed_haspressed 的判断,即必须重新选择一次筛选条件 + if (click_filter_menu_not_stationed_button()) { + Log.info("successfully set filter to [Not Assigned]"); + m_if_filter_notstationed_haspressed = true; + } } if (!m_is_custom || current_room_config().autofill) {