mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 12:06:16 -08:00
refactor: implement automatic unsubscription for favorites loading in StalkerLiveStreamLayout
This commit is contained in:
1 parent
3e7c58b049
commit
8900ee1834
1 file changed
+2
+2
@@ -10,6 +10,7 @@ import {
|
||||
signal,
|
||||
viewChild,
|
||||
} from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MatButton, MatIconButton } from '@angular/material/button';
|
||||
@@ -111,6 +112,7 @@ export class StalkerLiveStreamLayoutComponent implements OnDestroy {
|
||||
// Load favorites for current playlist
|
||||
this.playlistService
|
||||
.getPortalFavorites(this.stalkerStore.currentPlaylist()?._id)
|
||||
.pipe(takeUntilDestroyed())
|
||||
.subscribe((favs) => {
|
||||
favs.forEach((fav: any) => {
|
||||
this.favorites.set(fav.id, true);
|
||||
|
||||
Reference in new issue
Block a user