about summary refs log tree commit diff
path: root/src/state/preferences/autoplay.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/preferences/autoplay.tsx')
-rw-r--r--src/state/preferences/autoplay.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/preferences/autoplay.tsx b/src/state/preferences/autoplay.tsx
index d5aa049f3..141c8161e 100644
--- a/src/state/preferences/autoplay.tsx
+++ b/src/state/preferences/autoplay.tsx
@@ -24,8 +24,8 @@ export function Provider({children}: {children: React.ReactNode}) {
   )
 
   React.useEffect(() => {
-    return persisted.onUpdate(() => {
-      setState(Boolean(persisted.get('disableAutoplay')))
+    return persisted.onUpdate('disableAutoplay', nextDisableAutoplay => {
+      setState(Boolean(nextDisableAutoplay))
     })
   }, [setStateWrapped])