fix: 修复加载外服web资源失败

This commit is contained in:
uye
2023-04-21 18:08:35 +08:00
parent 02e0e39e47
commit d12b59a7cc

View File

@@ -48,7 +48,6 @@ namespace MaaWpfGui.Services
// model references
private readonly TaskQueueViewModel _taskQueueViewModel;
private readonly SettingsViewModel _settingsViewModel;
private readonly IMaaApiService _maaApiService;
private static readonly ILogger _logger = Log.ForContext<StageManager>();
@@ -148,7 +147,7 @@ namespace MaaWpfGui.Services
// TODO: There may be an issue when the CN resource is loaded from cache (e.g. network down) while global resource is downloaded (e.g. network up again)
// var tasksJsonClient = fromWeb ? WebService.RequestMaaApiWithCache(tasksPath) : WebService.RequestMaaApiWithCache(tasksPath);
await _maaApiService.RequestMaaApiWithCache(tasksPath);
AsstProxy.AsstLoadResource(Directory.GetCurrentDirectory() + "\\cache\\resource\\global\\" + _settingsViewModel.ClientType);
AsstProxy.AsstLoadResource(Directory.GetCurrentDirectory() + "\\cache\\resource\\global\\" + clientType);
}
return activity;