fix(dashboard): address rail review feedback

This commit is contained in:
4gray committed 2026-06-20 23:10:18 +02:00
1 parent b6c5367d63
commit dbc90bed06
4 files changed
+22 -14

No files matched your search

@@ -449,6 +449,8 @@ describe('DashboardDataService', () => {
expect.objectContaining({ title: 'Channel Two' }),
])
);
expect(service.globalFavoritesLoaded()).toBe(true);
expect(service.globalFavoritesLoading()).toBe(false);
});
it('keeps the earliest matching M3U favorite id when channel id and URL both match', async () => {
@@ -542,6 +542,12 @@ export class DashboardDataService {
const m3uReload = this.reloadPlaylistBackedGlobalFavorites();
await Promise.all([xtreamReload, m3uReload]);
if (
this.playlistsLoaded() &&
!this.playlistBackedGlobalFavoritesLoadedState()
) {
await this.reloadPlaylistBackedGlobalFavorites();
}
this.finishInitialGlobalFavoritesLoadIfReady();
this.favoritesAutoRefreshEnabled.set(true);
}
@@ -1212,17 +1218,14 @@ export class DashboardDataService {
const fallbackTimestamp =
this.getM3uFavoriteTimestamp(playlistMeta) ??
new Date(0).toISOString();
const items = resolvedChannels
.slice()
.sort((a, b) => a.favoriteIndex - b.favoriteIndex)
.map((favorite) =>
this.createM3uFavoriteItem(
playlistMeta,
favorite.favoriteId,
favorite.channel,
fallbackTimestamp
)
);
const items = resolvedChannels.slice().map((favorite) =>
this.createM3uFavoriteItem(
playlistMeta,
favorite.favoriteId,
favorite.channel,
fallbackTimestamp
)
);
this.m3uFavoritesCache.set(playlistMeta._id, {
fingerprint,