Bluesky app fork with some witchin' additions ๐Ÿ’ซ
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[๐Ÿด] only try to initialize once in the NUX (#4142)

* only try to initialize once

* nit

authored by

Hailey and committed by
GitHub
8cec1679 184c6583

+5 -2
+5 -2
src/components/dms/MessagesNUX.tsx
··· 53 53 const control = Dialog.useDialogContext() 54 54 const {_} = useLingui() 55 55 const t = useTheme() 56 + 57 + const [initialized, setInitialzed] = React.useState(false) 56 58 const {mutate: updateDeclaration} = useUpdateActorDeclaration({ 57 59 onError: () => { 58 60 Toast.show(_(msg`Failed to update settings`)) ··· 69 71 ) 70 72 71 73 useEffect(() => { 72 - if (!chatDeclation) { 74 + if (!chatDeclation && !initialized) { 73 75 updateDeclaration('following') 76 + setInitialzed(true) 74 77 } 75 - }, [chatDeclation, updateDeclaration]) 78 + }, [chatDeclation, updateDeclaration, initialized]) 76 79 77 80 return ( 78 81 <Dialog.ScrollableInner