feat: 支持web移除活动关卡导航

This commit is contained in:
uye
2023-01-29 18:14:30 +08:00
parent 3c66988e32
commit 360d3eb84f
2 changed files with 11 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ using MaaWpfGui.Helper;
using Newtonsoft.Json.Linq;
using Semver;
using Stylet;
using StyletIoC;
namespace MaaWpfGui
{
@@ -34,13 +35,16 @@ namespace MaaWpfGui
[DllImport("MaaCore.dll")]
private static extern IntPtr AsstGetVersion();
private readonly IContainer _container;
private Dictionary<string, StageInfo> _stages;
/// <summary>
/// Initializes a new instance of the <see cref="StageManager"/> class.
/// </summary>
public StageManager()
public StageManager(IContainer container)
{
_container = container;
UpdateStage(false);
Execute.OnUIThread(async () =>
@@ -48,6 +52,11 @@ namespace MaaWpfGui
var task = Task.Run(() =>
{
UpdateStage(true);
if (_container != null)
{
_container.Get<TaskQueueViewModel>().UpdateDatePrompt();
_container.Get<TaskQueueViewModel>().UpdateStageList(true);
}
});
await task;
});

View File

@@ -242,7 +242,7 @@ namespace MaaWpfGui
TaskItemViewModels = new ObservableCollection<DragItemViewModel>(temp_order_list);
_stageManager = new StageManager();
_stageManager = new StageManager(_container);
RemainingSanityStageList = new ObservableCollection<CombData>(_stageManager.GetStageList())
{
// It's Cur/Last option