Skip to content

Commit 3dfd557

Browse files
committed
Fix the problem of showing and hiding statistics columns
1 parent cd6bea2 commit 3dfd557

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

v2rayN/v2rayN/Views/ProfilesView.xaml.cs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -338,24 +338,16 @@ private void RestoreUI()
338338
item2.Width = item.Width;
339339
item2.DisplayIndex = displayIndex++;
340340
}
341+
if (item.Name.StartsWith("to"))
342+
{
343+
if (!_config.guiItem.enableStatistics)
344+
{
345+
item2.Visibility = Visibility.Hidden;
346+
}
347+
}
341348
}
342349
}
343350
}
344-
345-
if (!_config.guiItem.enableStatistics)
346-
{
347-
colTodayUp.Visibility =
348-
colTodayDown.Visibility =
349-
colTotalUp.Visibility =
350-
colTotalDown.Visibility = Visibility.Hidden;
351-
}
352-
else
353-
{
354-
colTodayUp.Visibility =
355-
colTodayDown.Visibility =
356-
colTotalUp.Visibility =
357-
colTotalDown.Visibility = Visibility.Visible;
358-
}
359351
}
360352

361353
private void StorageUI()

0 commit comments

Comments
 (0)