- {{ 'CHANNELS.ALL_CHANNELS' | translate }}
+@if (_channelList) {
+
+
+
+ list
+
+ {{ 'CHANNELS.ALL_CHANNELS' | translate }}
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- category
-
- {{ 'CHANNELS.GROUPS' | translate }}
-
-
-
-
-
-
- 0"
- >
- {{
- groups.key || ('CHANNELS.UNGROUPED' | translate)
- | titlecase
- }}
- ({{ groups.value.length }})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- star
-
- {{ 'CHANNELS.FAVORITES' | translate }}
-
-
-
- 0; else noFavorites">
+
+
-
-
- {{
- 'CHANNELS.NO_FAVORITES' | translate
- }}
-
- {{
- 'CHANNELS.USE_STAR_TO_FAVORITE' | translate
- }}
+
+
+
+
+
+ category
+
+ {{ 'CHANNELS.GROUPS' | translate }}
+
-
-
-
+
+
+
+
+ 0"
+ >
+ {{
+ groups.key ||
+ ('CHANNELS.UNGROUPED' | translate)
+ | titlecase
+ }}
+ ({{ groups.value.length }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ star
+
+ {{ 'CHANNELS.FAVORITES' | translate }}
+
+
+
+ 0; else noFavorites">
+
+
+
+ {{
+ 'CHANNELS.NO_FAVORITES' | translate
+ }}
+
+ {{
+ 'CHANNELS.USE_STAR_TO_FAVORITE' | translate
+ }}
+
+
+
+
+} @else {
+ No channels there
+}
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 a87b35b1c..6ff3cfcb3 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
@@ -70,17 +70,18 @@ export class ChannelListContainerComponent {
);
/** List with favorites */
- favorites$ = this.store
- .select(selectFavorites)
- .pipe(
- map((favoriteChannelIds) =>
+ favorites$ = this.store.select(selectFavorites).pipe(
+ map(
+ (
+ favoriteChannelIds // TODO: move to selector
+ ) =>
favoriteChannelIds.map((favoriteChannelId) =>
this.channelList.find(
(channel) => channel.id === favoriteChannelId
)
)
- )
- );
+ )
+ );
constructor(
private readonly store: Store,
@@ -129,4 +130,8 @@ export class ChannelListContainerComponent {
})
);
}
+
+ ngOnDestroy() {
+ this.store.dispatch(PlaylistActions.setChannels({ channels: [] }));
+ }
}
diff --git a/src/app/player/components/video-player/sidebar/sidebar.component.html b/src/app/player/components/video-player/sidebar/sidebar.component.html
index d4ffa73bb..d39c634bc 100644
--- a/src/app/player/components/video-player/sidebar/sidebar.component.html
+++ b/src/app/player/components/video-player/sidebar/sidebar.component.html
@@ -17,7 +17,7 @@
{{
sidebarView === 'CHANNELS'
- ? channels.length +
+ ? channels?.length +
' ' +
('HOME.PLAYLISTS.CHANNELS' | translate)
: ('HOME.PLAYLISTS.MY_PLAYLISTS_SUBTITLE' | translate)
@@ -38,16 +38,13 @@