mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
feat: 添加 MirrorChyan 资源更新方式 (#11669)
Co-authored-by: MistEO <mistereo@hotmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@ using System.Windows;
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
using MaaWpfGui.Main;
|
||||
using MaaWpfGui.Models;
|
||||
using MaaWpfGui.Services;
|
||||
using MaaWpfGui.States;
|
||||
using Newtonsoft.Json;
|
||||
@@ -465,6 +466,22 @@ public class VersionUpdateViewModel : Screen
|
||||
}
|
||||
*/
|
||||
|
||||
// 可以用 MirrorChyan 资源更新了喵
|
||||
switch (SettingsViewModel.VersionUpdateSettings.ResourceUpdateSource)
|
||||
{
|
||||
case "MirrorChyan":
|
||||
if (!string.IsNullOrEmpty(SettingsViewModel.VersionUpdateSettings.MirrorChyanCdk))
|
||||
{
|
||||
if (await ResourceUpdater.UpdateFromMirrorChyanAsync())
|
||||
{
|
||||
SettingsViewModel.VersionUpdateSettings.IsCheckingForUpdates = false;
|
||||
return CheckUpdateRetT.OnlyGameResourceUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
SettingsViewModel.VersionUpdateSettings.IsCheckingForUpdates = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user