mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-19 11:45:00 +03:00
Remove invalid by test results
This commit is contained in:
@@ -79,6 +79,7 @@ namespace ServiceLib.ViewModels
|
||||
public ReactiveCommand<Unit, Unit> RealPingServerCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> SpeedServerCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> SortServerResultCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> RemoveInvalidServerResultCmd { get; }
|
||||
|
||||
//servers export
|
||||
public ReactiveCommand<Unit, Unit> Export2ClientConfigCmd { get; }
|
||||
@@ -197,6 +198,10 @@ namespace ServiceLib.ViewModels
|
||||
{
|
||||
await SortServer(EServerColName.DelayVal.ToString());
|
||||
});
|
||||
RemoveInvalidServerResultCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
await RemoveInvalidServerResult();
|
||||
});
|
||||
//servers export
|
||||
Export2ClientConfigCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
@@ -659,6 +664,13 @@ namespace ServiceLib.ViewModels
|
||||
RefreshServers();
|
||||
}
|
||||
|
||||
public async Task RemoveInvalidServerResult()
|
||||
{
|
||||
var count = await ConfigHandler.RemoveInvalidServerResult(_config, _config.SubIndexId);
|
||||
RefreshServers();
|
||||
NoticeHandler.Instance.Enqueue(string.Format(ResUI.RemoveInvalidServerResultTip, count));
|
||||
}
|
||||
|
||||
//move server
|
||||
private async Task MoveToGroup(bool c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user