mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
perf: 热更新资源改为异步加载避免启动阻塞
This commit is contained in:
@@ -46,7 +46,7 @@ namespace MaaWpfGui.Services
|
||||
private static readonly ILogger _logger = Log.ForContext<StageManager>();
|
||||
|
||||
// data
|
||||
private Dictionary<string, StageInfo> _stages;
|
||||
private Dictionary<string, StageInfo> _stages = [];
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StageManager"/> class.
|
||||
@@ -158,7 +158,10 @@ namespace MaaWpfGui.Services
|
||||
await Instances.MaaApiService.RequestMaaApiWithCache(tasksPath);
|
||||
}
|
||||
|
||||
Instances.AsstProxy.LoadResource();
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Instances.AsstProxy.LoadResource();
|
||||
});
|
||||
return activity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user