fix(ui): do not show not live 24/7 streamers

This commit is contained in:
2026-04-05 20:02:46 +02:00
parent d552836845
commit bcdc4122f8
2 changed files with 3 additions and 4 deletions

View File

@@ -25,9 +25,9 @@ export default function Sidebar({ ...props }: React.ComponentProps<typeof UISide
if (isLoading) return <SidebarSkeleton {...props} />;
const alwaysOnStreamers = stream?.filter((s) => s.channel.is247) || [];
const alwaysOnStreamers = stream?.filter((s) => s.isLive && s.channel.is247) || [];
const liveStreamers = stream?.filter((s) => s.isLive && !s.channel.is247) || [];
const offlineStreamers = stream?.filter((s) => !s.isLive && !s.channel.is247) || [];
const offlineStreamers = stream?.filter((s) => !s.isLive) || [];
return (
<UISidebar collapsible="icon" {...props}>

View File

@@ -25,7 +25,7 @@ export default function StreamGrid({ liveStreams, offlineStreams }: StreamGridPr
.filter((stream) => !stream.channel.is247)
.sort((a, b) => b.viewers - a.viewers);
const alwaysOnStreams = [...liveStreams, ...offlineStreams]
.filter((stream) => stream.channel.is247)
.filter((stream) => stream.isLive && stream.channel.is247)
.sort((a, b) => {
if (a.isLive !== b.isLive) {
return Number(b.isLive) - Number(a.isLive);
@@ -38,7 +38,6 @@ export default function StreamGrid({ liveStreams, offlineStreams }: StreamGridPr
return a.channel.name.localeCompare(b.channel.name);
});
const sortedOfflineStreams = offlineStreams
.filter((stream) => !stream.channel.is247)
.sort((a, b) => a.channel.name.localeCompare(b.channel.name));
const hasVisibleLiveStreams = sortedLiveStreams.length > 0 || alwaysOnStreams.some((stream) => stream.isLive);