From bce4717de616cd4a1d1f947381905fce33bffc50 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 27 Sep 2025 16:30:22 +0200 Subject: [PATCH 1/2] fix(player): use channel URL for favorites ordering Use channel.url instead of channel.id when updating the favorites ordering in the playlist store. The change ensures the dispatched setFavorites action contains the correct identifierurl) that the store and downstream logic expect, preventing mismatches between the UI order and persisted favorites. --- .../channel-list-container/channel-list-container.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/player/components/channel-list-container/channel-list-container.component.ts b/src/app/player/components/channel-list-container/channel-list-container.component.ts index c83ec4aa4..1f210ce57 100644 --- a/src/app/player/components/channel-list-container/channel-list-container.component.ts +++ b/src/app/player/components/channel-list-container/channel-list-container.component.ts @@ -163,7 +163,7 @@ export class ChannelListContainerComponent { moveItemInArray(favorites, event.previousIndex, event.currentIndex); this.store.dispatch( PlaylistActions.setFavorites({ - channelIds: favorites.map((item) => item.id), + channelIds: favorites.map((item) => item.url), }) ); } From 0e2ba6b138f707e33c0e8e1e7369f6b25a012016 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 27 Sep 2025 16:30:55 +0200 Subject: [PATCH 2/2] refactor: convert *ngFor to control-flow @for loops in channel list --- .../channel-list-container.component.html | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/src/app/player/components/channel-list-container/channel-list-container.component.html b/src/app/player/components/channel-list-container/channel-list-container.component.html index 95f34c71b..1c0a2e4bc 100644 --- a/src/app/player/components/channel-list-container/channel-list-container.component.html +++ b/src/app/player/components/channel-list-container/channel-list-container.component.html @@ -57,7 +57,10 @@ - @for (groups of groupedChannels | keyvalue: groupsComparator; track $index) { + @for ( + groups of groupedChannels | keyvalue: groupsComparator; + track $index + ) { @if (groups.value.length > 0) { @@ -70,13 +73,11 @@ - + @for ( + channel of groups.value; + track trackByFn($index, channel); + let i = $index + ) { - + } } @@ -118,28 +119,30 @@ id="favorites-list" > @if (favorites.length > 0) { - + @for ( + channel of favorites; + track trackByFn($index, channel); + let i = $index + ) { + + } } @else { {{