mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
refactor: enhance params handling in recently viewed and favorites components
This commit is contained in:
1 parent
ed9e85f5e8
commit
a72fb31d7a
2 files changed
+20
-14
No files matched your search
@@ -47,13 +47,16 @@ export class RecentlyViewedComponent {
|
||||
readonly currentPlaylist = this.stalkerStore.currentPlaylist;
|
||||
|
||||
readonly allFavorites = rxResource({
|
||||
params: () => ({
|
||||
refreshTimestamp: this.refreshTimestamp(),
|
||||
}),
|
||||
stream: () =>
|
||||
this.playlistService.getPortalRecentlyViewed(
|
||||
this.stalkerStore.currentPlaylist()?._id
|
||||
),
|
||||
params: () => {
|
||||
const portalId = this.stalkerStore.currentPlaylist()?._id;
|
||||
if (!portalId) return undefined;
|
||||
return {
|
||||
portalId,
|
||||
refreshTimestamp: this.refreshTimestamp(),
|
||||
};
|
||||
},
|
||||
stream: ({ params }) =>
|
||||
this.playlistService.getPortalRecentlyViewed(params.portalId),
|
||||
});
|
||||
|
||||
readonly categories = computed(() => [
|
||||
|
||||
@@ -47,13 +47,16 @@ export class StalkerFavoritesComponent {
|
||||
readonly currentPlaylist = this.stalkerStore.currentPlaylist;
|
||||
|
||||
readonly allFavorites = rxResource({
|
||||
params: () => ({
|
||||
refreshTimestamp: this.refreshTimestamp(),
|
||||
}),
|
||||
stream: () =>
|
||||
this.playlistService.getPortalFavorites(
|
||||
this.stalkerStore.currentPlaylist()?._id
|
||||
),
|
||||
params: () => {
|
||||
const portalId = this.stalkerStore.currentPlaylist()?._id;
|
||||
if (!portalId) return undefined;
|
||||
return {
|
||||
portalId,
|
||||
refreshTimestamp: this.refreshTimestamp(),
|
||||
};
|
||||
},
|
||||
stream: ({ params }) =>
|
||||
this.playlistService.getPortalFavorites(params.portalId),
|
||||
});
|
||||
|
||||
readonly categories = computed(() => [
|
||||
|
||||
Reference in new issue
Block a user