Temp fix current items ordering

This commit is contained in:
2023-07-05 13:47:14 +02:00
parent 83fe3a1dcd
commit 228978745a
2 changed files with 5 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ public class Tab : ITab
//TODO: Order
=> SortExpressionComparer<IItem>
.Ascending(i => i.Type)
.ThenByAscending(i => i.DisplayName?.ToLower() ?? "");
.ThenByAscending(i => i.DisplayName.ToLower());
private async Task<IItem> MapItem(AbsolutePath item) => await item.ResolveAsync(true);

View File

@@ -373,12 +373,15 @@
</Image.RenderTransform>
</Image>
</Grid>
<!-- Note: On Windows CurrentItemsCollection is not sorted (for some reason) -->
<!-- Although CurrentItemsCollectionObservable is slower, but it is sorted -->
<!-- This should be fixed (works on linux tho...) -->
<ListBox
AutoScrollToSelectedItem="True"
Classes="ContentListView"
Grid.Row="1"
IsTabStop="True"
ItemsSource="{Binding AppState.SelectedTab^.CurrentItemsCollection.Collection}"
ItemsSource="{Binding AppState.SelectedTab^.CurrentItemsCollectionObservable^}"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Visible"
SelectedItem="{Binding AppState.SelectedTab^.CurrentSelectedItem^}"