mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 11:59:13 +00:00
Compare commits
4 commits
91af50f99a
...
f2ed8c1d6b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f2ed8c1d6b | ||
![]() |
308b216d1b | ||
![]() |
c713f5c8f5 | ||
![]() |
6771eb25d1 |
5 changed files with 26 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.15.1</Version>
|
||||
<Version>7.15.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.1" />
|
||||
<PackageVersion Include="MaterialDesignThemes" Version="5.3.0" />
|
||||
<PackageVersion Include="MessageBox.Avalonia" Version="3.2.0" />
|
||||
<PackageVersion Include="QRCoder" Version="1.6.0" />
|
||||
<PackageVersion Include="QRCoder" Version="1.7.0" />
|
||||
<PackageVersion Include="ReactiveUI" Version="20.4.1" />
|
||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="20.4.1" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7" />
|
||||
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7" />
|
||||
<PackageVersion Include="NLog" Version="6.0.4" />
|
||||
<PackageVersion Include="NLog" Version="6.0.5" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||
|
|
|
@ -10,7 +10,7 @@ public class ActionPrecheckManager(Config config)
|
|||
|
||||
private readonly Config _config = config;
|
||||
|
||||
public async Task<List<string>> CheckBeforeSetActive(string? indexId)
|
||||
public async Task<List<string>> Check(string? indexId)
|
||||
{
|
||||
if (indexId.IsNullOrEmpty())
|
||||
{
|
||||
|
@ -23,10 +23,10 @@ public class ActionPrecheckManager(Config config)
|
|||
return [ResUI.PleaseSelectServer];
|
||||
}
|
||||
|
||||
return await CheckBeforeGenerateConfig(item);
|
||||
return await Check(item);
|
||||
}
|
||||
|
||||
public async Task<List<string>> CheckBeforeGenerateConfig(ProfileItem? item)
|
||||
public async Task<List<string>> Check(ProfileItem? item)
|
||||
{
|
||||
if (item is null)
|
||||
{
|
||||
|
|
|
@ -538,6 +538,18 @@ public class MainWindowViewModel : MyReactiveObject
|
|||
|
||||
BlReloadEnabled = false;
|
||||
|
||||
var msgs = await ActionPrecheckManager.Instance.Check(_config.IndexId);
|
||||
if (msgs.Count > 0)
|
||||
{
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
NoticeManager.Instance.Enqueue(Utils.List2String(msgs.Take(10).ToList(), true));
|
||||
BlReloadEnabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
await Task.Run(async () =>
|
||||
{
|
||||
await LoadCore();
|
||||
|
|
|
@ -605,16 +605,6 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
|
||||
var msgs = await ActionPrecheckManager.Instance.CheckBeforeSetActive(indexId);
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
if (msgs.Count > 0)
|
||||
{
|
||||
NoticeManager.Instance.Enqueue(msgs.First());
|
||||
}
|
||||
|
||||
if (await ConfigHandler.SetDefaultServerIndex(_config, indexId) == 0)
|
||||
{
|
||||
await RefreshServers();
|
||||
|
@ -779,15 +769,17 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
|
||||
var msgs = await ActionPrecheckManager.Instance.CheckBeforeGenerateConfig(item);
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
var msgs = await ActionPrecheckManager.Instance.Check(item);
|
||||
if (msgs.Count > 0)
|
||||
{
|
||||
NoticeManager.Instance.Enqueue(msgs.First());
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
NoticeManager.Instance.Enqueue(Utils.List2String(msgs.Take(10).ToList(), true));
|
||||
return;
|
||||
}
|
||||
|
||||
if (blClipboard)
|
||||
{
|
||||
var result = await CoreConfigHandler.GenerateClientConfig(item, null);
|
||||
|
|
Loading…
Reference in a new issue