Fix memo params causing tuner to lose state (#1924)
parent
952f5033d0
commit
03b20c70e4
|
@ -92,9 +92,11 @@ export function usePostFeedQuery(
|
||||||
return new FollowingFeedAPI(agent)
|
return new FollowingFeedAPI(agent)
|
||||||
}
|
}
|
||||||
}, [feedDesc, params, feedTuners, agent])
|
}, [feedDesc, params, feedTuners, agent])
|
||||||
|
|
||||||
|
const disableTuner = !!params?.disableTuner
|
||||||
const tuner = useMemo(
|
const tuner = useMemo(
|
||||||
() => (params?.disableTuner ? new NoopFeedTuner() : new FeedTuner()),
|
() => (disableTuner ? new NoopFeedTuner() : new FeedTuner()),
|
||||||
[params],
|
[disableTuner],
|
||||||
)
|
)
|
||||||
|
|
||||||
const pollLatest = useCallback(async () => {
|
const pollLatest = useCallback(async () => {
|
||||||
|
|
Loading…
Reference in New Issue