Skip to content

Commit

Permalink
Remove delay between JS9 frames
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 14, 2022
1 parent d7221e6 commit 75e7a26
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/renderer/Guider/JS9/JS9Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,16 @@ function JS9FrameInner(
React.useEffect(() => {
if (!filenameBundle || !host || !port) {
setPath(null);
return () => {};
return;
}

let filename: string;
filenameBundle.values.some((fn: string) => {
if (fn.includes(display)) {
filename = fn;
updateImage(fn ?? null);
return true;
}
return false;
});

const delay = parseInt(display[3], 10) * 100;
const timeout = setTimeout(() => updateImage(filename ?? null), delay);

return () => clearTimeout(timeout);
}, [filenameBundle, host, port, display, updateImage]);

return (
Expand Down

0 comments on commit 75e7a26

Please sign in to comment.