From 286580d5aa9a8bf3b6efdb384fb603e75fb32b19 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Sun, 11 Jul 2021 14:40:31 -0500 Subject: [PATCH] more sorting fixes (#299) --- CHANGELOG.md | 1 + ErsatzTV/Pages/ScheduleItemsEditor.razor | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02603964..66a47947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Use case-insensitive sorting for collections page and `Add to Collection` dialog +- Use case-insensitive sorting for all collection lists in schedule items editor - Use natural sorting for schedules page and `Add to Schedule` dialog ### Fixed diff --git a/ErsatzTV/Pages/ScheduleItemsEditor.razor b/ErsatzTV/Pages/ScheduleItemsEditor.razor index 3d44cc5f..b36322c3 100644 --- a/ErsatzTV/Pages/ScheduleItemsEditor.razor +++ b/ErsatzTV/Pages/ScheduleItemsEditor.razor @@ -193,10 +193,14 @@ private async Task LoadScheduleItems() { // TODO: fix performance - _mediaCollections = await _mediator.Send(new GetAllCollections()); - _televisionShows = await _mediator.Send(new GetAllTelevisionShows()); - _televisionSeasons = await _mediator.Send(new GetAllTelevisionSeasons()); - _artists = await _mediator.Send(new GetAllArtists()); + _mediaCollections = await _mediator.Send(new GetAllCollections()) + .Map(list => list.OrderBy(vm => vm.Name, StringComparer.CurrentCultureIgnoreCase).ToList()); + _televisionShows = await _mediator.Send(new GetAllTelevisionShows()) + .Map(list => list.OrderBy(vm => vm.Name, StringComparer.CurrentCultureIgnoreCase).ToList()); + _televisionSeasons = await _mediator.Send(new GetAllTelevisionSeasons()) + .Map(list => list.OrderBy(vm => vm.Name, StringComparer.CurrentCultureIgnoreCase).ToList()); + _artists = await _mediator.Send(new GetAllArtists()) + .Map(list => list.OrderBy(vm => vm.Name, StringComparer.CurrentCultureIgnoreCase).ToList()); string name = string.Empty; Option maybeSchedule = await _mediator.Send(new GetProgramScheduleById(Id));