fix: code-review round 1 — 4 findings
- og: guard safe_abs_path's None (missing/gc'd poster) before _jpeg_size, else the public /watch OG render crashed with an uncaught AttributeError - channels: hoist the priority step button to module scope so it no longer remounts on every hold-repeat tick (which dropped the pointer capture and could let a hold run away on pointer drift) - watch: only route audio through Web Audio on iOS (where a backgrounded <video> is suspended); other platforms keep their reliable native audio, avoiding a foreground-silence risk if the AudioContext can't resume - share: drop the unstable `create` mutation object from the auto-create effect deps (it changes every render); the links.data trigger + autoTried ref already fire it exactly once The clipboard-on-focus finding is intended (the user explicitly asked for auto-paste on focus; the read is best-effort and browsers reject it without a gesture, so no real prompt fires).
This commit is contained in:
@@ -281,7 +281,10 @@ function LinkShare({ job }: { job: DownloadJob }) {
|
||||
autoTried.current = true;
|
||||
create.mutate();
|
||||
}
|
||||
}, [links.data, create]);
|
||||
// Only links.data (empty → auto-create once) should drive this; `create` is a fresh object every
|
||||
// render and would re-run the effect needlessly. The autoTried ref makes it fire exactly once.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [links.data]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user