diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml index 5cc3d6f6..73265c92 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml @@ -204,7 +204,7 @@ Binding="{Binding SubRemarks}" Header="{x:Static resx:ResUI.LvSubscription}" Tag="SubRemarks" /> - + diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs index 1ac0cad3..9983f8c7 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs @@ -32,6 +32,7 @@ namespace v2rayN.Desktop.Views lstProfiles.SelectionChanged += lstProfiles_SelectionChanged; lstProfiles.DoubleTapped += LstProfiles_DoubleTapped; lstProfiles.LoadingRow += LstProfiles_LoadingRow; + lstProfiles.Sorting += LstProfiles_Sorting; //if (_config.uiItem.enableDragDropSort) //{ // lstProfiles.AllowDrop = true; @@ -92,6 +93,13 @@ namespace v2rayN.Desktop.Views ViewModel?.RefreshServers(); } + private async void LstProfiles_Sorting(object? sender, DataGridColumnEventArgs e) + { + e.Handled = true; + await ViewModel?.SortServer(e.Column.Tag.ToString()); + e.Handled = false; + } + //#region Event private async Task UpdateViewHandler(EViewAction action, object? obj)