From 036222333ffe2400a7f3def8c08df17c60e247dc Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Thu, 11 Dec 2025 10:37:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=8A=A8=E7=BC=96=E9=98=9F?= =?UTF-8?q?=E5=8A=A9=E6=88=98=E5=88=87=E6=8D=A2=E8=81=8C=E4=B8=9Aretry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Ui/SupportList.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/MaaCore/Ui/SupportList.cpp b/src/MaaCore/Ui/SupportList.cpp index 08836d856c..52faa81bd1 100644 --- a/src/MaaCore/Ui/SupportList.cpp +++ b/src/MaaCore/Ui/SupportList.cpp @@ -1,10 +1,9 @@ #include "SupportList.h" #include "Config/GeneralConfig.h" -#include "Config/Miscellaneous/BattleDataConfig.h" #include "Config/TaskData.h" #include "Controller/Controller.h" -#include "MaaUtils/ImageIo.h" +#include "Task/AbstractTask.h" #include "Task/AbstractTask.h" #include "Task/ProcessTask.h" #include "Utils/DebugImageHelper.hpp" @@ -42,6 +41,7 @@ bool asst::SupportList::select_role(const Role role) m_parent, { enum_to_string(role, true) + "@SupportList-RoleSelected", enum_to_string(role, true) + "@SupportList-SelectRole" }) + .set_retry_times(20) .run()) { m_selected_role = role; Log.info(__FUNCTION__, "| Successfully selected role", enum_to_string(role)); @@ -49,9 +49,8 @@ bool asst::SupportList::select_role(const Role role) } m_selected_role = Role::Unknown; - Log.error( - __FUNCTION__, - std::format("| Failed to select role {}; the currently selected role is unknown", enum_to_string(role))); + LogError << __FUNCTION__ << "| Failed to select role" << enum_to_string(role) + << "the currently selected role is unknown"; return false; } @@ -60,9 +59,8 @@ bool asst::SupportList::update() LogTraceFunction; if (m_in_support_unit_detail_panel) { - Log.error( - __FUNCTION__, - "| Invalid operation: currently in support unit detail panel; failed to update support list"); + LogError << __FUNCTION__ + << "| Invalid operation: currently in support unit detail panel; failed to update support list"; return false; }