[🐴] infinite stale time (#4051)
parent
ef0ce951e7
commit
dff6bd7c65
|
@ -4,6 +4,7 @@ import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||||
import {DM_SERVICE_HEADERS} from '#/state/queries/messages/const'
|
import {DM_SERVICE_HEADERS} from '#/state/queries/messages/const'
|
||||||
import {useOnMarkAsRead} from '#/state/queries/messages/list-converations'
|
import {useOnMarkAsRead} from '#/state/queries/messages/list-converations'
|
||||||
import {useAgent} from '#/state/session'
|
import {useAgent} from '#/state/session'
|
||||||
|
import {STALE} from 'state/queries'
|
||||||
import {RQKEY as LIST_CONVOS_KEY} from './list-converations'
|
import {RQKEY as LIST_CONVOS_KEY} from './list-converations'
|
||||||
|
|
||||||
const RQKEY_ROOT = 'convo'
|
const RQKEY_ROOT = 'convo'
|
||||||
|
@ -22,6 +23,7 @@ export function useConvoQuery(convo: ChatBskyConvoDefs.ConvoView) {
|
||||||
return data.convo
|
return data.convo
|
||||||
},
|
},
|
||||||
initialData: convo,
|
initialData: convo,
|
||||||
|
staleTime: STALE.INFINITY,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue