diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index 4f7908af..d5a3b9e9 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -690,6 +690,28 @@ namespace v2rayN.Handler { lstProfile[i].sort = (i + 1) * 10; } + if (name == EServerColName.delay) + { + var maxSort = lstProfile.Max(t => t.sort) + 10; + foreach (var item in lstProfile) + { + if (item.delay <= 0) + { + item.sort = maxSort; + } + } + } + if (name == EServerColName.speed) + { + var maxSort = lstProfile.Max(t => t.sort) + 10; + foreach (var item in lstProfile) + { + if (item.speed <= 0) + { + item.sort = maxSort; + } + } + } SqliteHelper.Instance.UpdateAll(lstProfile); diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 57c2f072..79ed75d2 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -49,7 +49,7 @@ VerticalAlignment="Center" ClipToBounds="True" Style="{StaticResource MaterialDesignToolBar}"> - + @@ -95,7 +95,7 @@ - + @@ -127,7 +127,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -228,7 +228,7 @@ - + - +