From 40f36c58c654d005f6fa138681021477e584eaa2 Mon Sep 17 00:00:00 2001 From: Horst Beham Date: Tue, 11 Feb 2020 23:25:32 +0100 Subject: [PATCH] fixed: removing channels from a favorite list caused incorrect reordering --- source/ChanSort.Api/Controller/Editor.cs | 6 +++--- source/changelog.md | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/ChanSort.Api/Controller/Editor.cs b/source/ChanSort.Api/Controller/Editor.cs index 4dacf17..cf509e3 100644 --- a/source/ChanSort.Api/Controller/Editor.cs +++ b/source/ChanSort.Api/Controller/Editor.cs @@ -384,10 +384,10 @@ namespace ChanSort.Api if (sortedFav && !this.DataRoot.AllowGapsInFavNumbers) { int i = 0; - foreach (var channel in favList.Channels) + foreach (var channel in favList.Channels.OrderBy(c => c.FavIndex[favIndex])) { - if (channel.FavIndex[i] != -1) - channel.FavIndex[i] = ++i; + if (channel.FavIndex[favIndex] != -1) + channel.FavIndex[favIndex] = ++i; } } } diff --git a/source/changelog.md b/source/changelog.md index 83c151f..e29aa8a 100644 --- a/source/changelog.md +++ b/source/changelog.md @@ -1,6 +1,9 @@ ChanSort Change Log =================== +2020-02-11B +- fixed: removing channels from a favorite list caused incorrect reordering + 2020-02-11 - Philips: show and edit customized titles of favorite lists - fixed non-unique numbers in mixed-source favorite lists when using "Add to Fav A" (Panasonic, Hisense, Sony, Philips)