mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-01 01:10:34 +08:00
Revert "perf: 仅在LinkStart时执行完成后动作, 避免单次运行时触发"
This reverts commit b3801e64ee.
This commit is contained in:
@@ -1176,8 +1176,6 @@ public class AsstProxy
|
||||
|
||||
case AsstMsg.AllTasksCompleted:
|
||||
bool isMainTaskQueueAllCompleted = false;
|
||||
bool startByLinkStart = Instances.TaskQueueViewModel.StartByLinkStart;
|
||||
Instances.TaskQueueViewModel.StartByLinkStart = false;
|
||||
var taskList = details["finished_tasks"]?.ToObject<AsstTaskId[]>();
|
||||
if (taskList?.Length > 0)
|
||||
{
|
||||
@@ -1289,15 +1287,12 @@ public class AsstProxy
|
||||
}
|
||||
|
||||
// Instances.TaskQueueViewModel.CheckAndShutdown();
|
||||
_ = Instances.TaskQueueViewModel.CheckAfterCompleted();
|
||||
|
||||
if (Instances.OverlayViewModel.IsCreated)
|
||||
{
|
||||
AchievementTrackerHelper.Instance.Unlock(AchievementIds.LogSupervisor);
|
||||
}
|
||||
|
||||
if (startByLinkStart)
|
||||
{
|
||||
_ = Instances.TaskQueueViewModel.CheckAfterCompleted();
|
||||
}
|
||||
}
|
||||
else if (isCopilotTaskChain)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
using JetBrains.Annotations;
|
||||
using MaaWpfGui.Configuration;
|
||||
using MaaWpfGui.Configuration.Factory;
|
||||
using MaaWpfGui.Configuration.Single.MaaTask;
|
||||
using MaaWpfGui.Constants;
|
||||
@@ -211,8 +212,6 @@ public class TaskQueueViewModel : Screen
|
||||
});
|
||||
}
|
||||
|
||||
#region Overlay
|
||||
|
||||
public static void ChooseOverlayTarget()
|
||||
{
|
||||
try
|
||||
@@ -276,8 +275,6 @@ public class TaskQueueViewModel : Screen
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Overlay
|
||||
|
||||
/// <summary>
|
||||
/// Gets or private sets the view models of log items.
|
||||
/// </summary>
|
||||
@@ -438,8 +435,6 @@ public class TaskQueueViewModel : Screen
|
||||
|
||||
#region ActionAfterTasks
|
||||
|
||||
public bool StartByLinkStart { get; set; }
|
||||
|
||||
private bool _enableAfterActionSetting;
|
||||
|
||||
/// <summary>
|
||||
@@ -1774,7 +1769,6 @@ public class TaskQueueViewModel : Screen
|
||||
/// <returns>Task</returns>
|
||||
public async Task LinkStart()
|
||||
{
|
||||
StartByLinkStart = true;
|
||||
using var log = new LogScope(_logger);
|
||||
await TaskQueueSerializingLock.WaitAsync();
|
||||
await LinkStartWithTasks(ConfigFactory.CurrentConfig.TaskQueue);
|
||||
|
||||
Reference in New Issue
Block a user