mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 11:59:13 +00:00
Compare commits
No commits in common. "f2ed8c1d6b1b93b37b7a2affff1bfa4c22bc4315" and "91af50f99a6398eb37cc6f2a0ba2ad4e6aad82aa" have entirely different histories.
f2ed8c1d6b
...
91af50f99a
5 changed files with 22 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.15.2</Version>
|
||||
<Version>7.15.1</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.7.0" />
|
||||
<PackageVersion Include="QRCoder" Version="1.6.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.5" />
|
||||
<PackageVersion Include="NLog" Version="6.0.4" />
|
||||
<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>> Check(string? indexId)
|
||||
public async Task<List<string>> CheckBeforeSetActive(string? indexId)
|
||||
{
|
||||
if (indexId.IsNullOrEmpty())
|
||||
{
|
||||
|
@ -23,10 +23,10 @@ public class ActionPrecheckManager(Config config)
|
|||
return [ResUI.PleaseSelectServer];
|
||||
}
|
||||
|
||||
return await Check(item);
|
||||
return await CheckBeforeGenerateConfig(item);
|
||||
}
|
||||
|
||||
public async Task<List<string>> Check(ProfileItem? item)
|
||||
public async Task<List<string>> CheckBeforeGenerateConfig(ProfileItem? item)
|
||||
{
|
||||
if (item is null)
|
||||
{
|
||||
|
|
|
@ -538,18 +538,6 @@ 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,6 +605,16 @@ 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();
|
||||
|
@ -769,17 +779,15 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
|
||||
var msgs = await ActionPrecheckManager.Instance.Check(item);
|
||||
var msgs = await ActionPrecheckManager.Instance.CheckBeforeGenerateConfig(item);
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
if (msgs.Count > 0)
|
||||
{
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
NoticeManager.Instance.SendMessage(msg);
|
||||
}
|
||||
NoticeManager.Instance.Enqueue(Utils.List2String(msgs.Take(10).ToList(), true));
|
||||
return;
|
||||
NoticeManager.Instance.Enqueue(msgs.First());
|
||||
}
|
||||
|
||||
if (blClipboard)
|
||||
{
|
||||
var result = await CoreConfigHandler.GenerateClientConfig(item, null);
|
||||
|
|
Loading…
Reference in a new issue