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:
@@ -587,6 +587,7 @@ export default function Feed({
|
||||
startAt={activeVideo.startAt}
|
||||
onClose={() => setActiveVideo(null)}
|
||||
onState={onState}
|
||||
onOpenChannel={onOpenChannel}
|
||||
/>
|
||||
)}
|
||||
{isFetchingNextPage && (
|
||||
|
||||
Reference in New Issue
Block a user