fix(player): open the channel page from the player without it bouncing back

Two bugs made clicking the channel name in the video modal just close the player:
- the second PlayerModal mount (main feed path) was missing onOpenChannel, so the handler
  hit its no-op early return;
- opening the channel synchronously pushed the _chan history entry, which the player's own
  useBackToClose teardown (history.back on unmount) then immediately popped. Now the open is
  deferred to a one-shot popstate listener that fires AFTER that teardown, so the channel
  entry lands at the feed level. Verified: player → channel name → channel page; Back → feed
  (player does not reappear).
This commit is contained in:
npeter83 2026-06-30 04:14:14 +02:00
parent 641fc393a7
commit 419231bddb
2 changed files with 13 additions and 1 deletions

View file

@ -587,6 +587,7 @@ export default function Feed({
startAt={activeVideo.startAt}
onClose={() => setActiveVideo(null)}
onState={onState}
onOpenChannel={onOpenChannel}
/>
)}
{isFetchingNextPage && (