From 4e3e5ce130f274420a83e157fb5ec2cc2c93d46e Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:03:29 +0800 Subject: [PATCH] Add CanUserReorderColumns for desktop --- v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml | 1 + v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs | 3 +-- v2rayN/v2rayN/Views/ProfilesView.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml index fbadc95b..bb09c9d6 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml @@ -84,6 +84,7 @@ lvColumnItem = new(); - for (int k = 0; k < lstProfiles.Columns.Count; k++) + foreach (var item2 in lstProfiles.Columns) { - var item2 = lstProfiles.Columns[k]; if (item2.Tag == null) { continue; diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index 749a31e9..d3a6c112 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -353,9 +353,9 @@ namespace v2rayN.Views private void StorageUI(string? n = null) { List lvColumnItem = new(); - for (int k = 0; k < lstProfiles.Columns.Count; k++) + foreach (var t in lstProfiles.Columns) { - var item2 = (MyDGTextColumn)lstProfiles.Columns[k]; + var item2 = (MyDGTextColumn)t; lvColumnItem.Add(new() { Name = item2.ExName,