Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix responsiveness of dismissing the progress guide (#4729)

authored by

Paul Frazee and committed by
GitHub
d837f964 12bf7962

+7 -8
+7 -8
src/state/shell/progress-guide.tsx
··· 59 59 export function Provider({children}: React.PropsWithChildren<{}>) { 60 60 const {_} = useLingui() 61 61 const {data: preferences} = usePreferencesQuery() 62 - const {mutateAsync, variables} = useSetActiveProgressGuideMutation() 62 + const {mutateAsync, variables, isPending} = 63 + useSetActiveProgressGuideMutation() 63 64 const gate = useGate() 64 65 65 - const activeProgressGuide = (variables || 66 - preferences?.bskyAppState?.activeProgressGuide) as ProgressGuide 66 + const activeProgressGuide = ( 67 + isPending ? variables : preferences?.bskyAppState?.activeProgressGuide 68 + ) as ProgressGuide 67 69 68 70 // ensure the unspecced attributes have the correct types 69 71 if (activeProgressGuide?.guide === 'like-10-and-follow-7') { ··· 103 105 }, 104 106 105 107 endProgressGuide() { 106 - // update the persisted first 107 - mutateAsync(undefined).then(() => { 108 - // now clear local state, to avoid rehydrating from the server 109 - setLocalGuideState(undefined) 110 - }) 108 + setLocalGuideState(undefined) 109 + mutateAsync(undefined) 111 110 }, 112 111 113 112 captureAction(action: ProgressGuideAction, count = 1) {