mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-26 21:06:56 +00:00
修复:点击表头排序时,超时服务器排在前面的问题
This commit is contained in:
parent
036786fcb0
commit
203baa8b11
2 changed files with 9 additions and 1 deletions
|
@ -204,7 +204,7 @@
|
||||||
Binding="{Binding SubRemarks}"
|
Binding="{Binding SubRemarks}"
|
||||||
Header="{x:Static resx:ResUI.LvSubscription}"
|
Header="{x:Static resx:ResUI.LvSubscription}"
|
||||||
Tag="SubRemarks" />
|
Tag="SubRemarks" />
|
||||||
<DataGridTemplateColumn SortMemberPath="Delay" Tag="Delay">
|
<DataGridTemplateColumn SortMemberPath="Delay" Tag="DelayVal">
|
||||||
<DataGridTemplateColumn.Header>
|
<DataGridTemplateColumn.Header>
|
||||||
<TextBlock Text="{x:Static resx:ResUI.LvTestDelay}" />
|
<TextBlock Text="{x:Static resx:ResUI.LvTestDelay}" />
|
||||||
</DataGridTemplateColumn.Header>
|
</DataGridTemplateColumn.Header>
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace v2rayN.Desktop.Views
|
||||||
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
||||||
lstProfiles.DoubleTapped += LstProfiles_DoubleTapped;
|
lstProfiles.DoubleTapped += LstProfiles_DoubleTapped;
|
||||||
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
||||||
|
lstProfiles.Sorting += LstProfiles_Sorting;
|
||||||
//if (_config.uiItem.enableDragDropSort)
|
//if (_config.uiItem.enableDragDropSort)
|
||||||
//{
|
//{
|
||||||
// lstProfiles.AllowDrop = true;
|
// lstProfiles.AllowDrop = true;
|
||||||
|
@ -92,6 +93,13 @@ namespace v2rayN.Desktop.Views
|
||||||
ViewModel?.RefreshServers();
|
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
|
//#region Event
|
||||||
|
|
||||||
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
||||||
|
|
Loading…
Reference in a new issue