From e5ae3df062beade3bae020a3e93e2adab6fa1b8d Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Sun, 9 Jul 2023 12:14:22 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/UI/VersionUpdateViewModel.cs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs index 8076297d35..99179c5151 100644 --- a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs @@ -735,27 +735,6 @@ namespace MaaWpfGui.ViewModels.UI } } - private async Task RequestGithubApi(string url, int retryTimes) - { - string response = string.Empty; - string[] requestSource = { "https://api.github.com/", "https://api.kgithub.com/" }; - do - { - for (var i = 0; i < requestSource.Length; i++) - { - // prevent current thread - response = await Instances.HttpService.GetStringAsync(new Uri(requestSource[i] + url)).ConfigureAwait(false); - if (!string.IsNullOrEmpty(response)) - { - break; - } - } - } - while (string.IsNullOrEmpty(response) && retryTimes-- > 0); - - return response; - } - /// /// 获取 GitHub Assets 对象对应的文件 ///