Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/deck/Deck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,14 @@ export default function Deck({ children }: { children: ReactNode }) {
c.onmessage = (e) => {
if (e.data?.type === 'state') {
applyingRemote.current = true;
setSlide(e.data.slide);
const s = e.data.slide;
setSlide(s);
setClicks(e.data.clicks);
// mirror go(): reset the build ceiling for the incoming slide. Without
// this the synced tab carries the previous slide's curMax forward
// (registerMax only ever raises it), leaving hasNext/hasPrev and the
// nav arrows wrong after the presenter jumps between slides.
setCurMax(Math.max(maxMap.current[s] || 0, e.data.clicks));
}
};
return () => c.close();
Expand Down