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:
parent
641fc393a7
commit
419231bddb
2 changed files with 13 additions and 1 deletions
|
|
@ -587,6 +587,7 @@ export default function Feed({
|
|||
startAt={activeVideo.startAt}
|
||||
onClose={() => setActiveVideo(null)}
|
||||
onState={onState}
|
||||
onOpenChannel={onOpenChannel}
|
||||
/>
|
||||
)}
|
||||
{isFetchingNextPage && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue