Integrate live threadgate query

This commit is contained in:
Eric Bailey
2024-08-02 16:20:31 -05:00
parent c3d8beee6d
commit 380c4dbf24
3 changed files with 60 additions and 2 deletions
+4
View File
@@ -18,6 +18,7 @@ import {makeListLink, makeProfileLink} from '#/lib/routes/links'
import {logger} from '#/logger'
import {isNative} from '#/platform/detection'
import {RQKEY_ROOT as POST_THREAD_RQKEY_ROOT} from '#/state/queries/post-thread'
import {threadgateRecordQueryKeyRoot} from '#/state/queries/threadgate'
import {
ThreadgateSetting,
threadgateViewToSettings,
@@ -110,6 +111,9 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
queryClient.invalidateQueries({
queryKey: [POST_THREAD_RQKEY_ROOT],
})
queryClient.invalidateQueries({
queryKey: [threadgateRecordQueryKeyRoot],
})
} catch (err) {
Toast.show(
_(