add focus refresh + polling (#3846)
This commit is contained in:
parent
4a2d4253e5
commit
ce02a41163
3 changed files with 23 additions and 2 deletions
|
@ -27,6 +27,7 @@ import {DialogControlProps, useDialogControl} from '#/components/Dialog'
|
|||
import {ConvoMenu} from '#/components/dms/ConvoMenu'
|
||||
import {NewChat} from '#/components/dms/NewChat'
|
||||
import * as TextField from '#/components/forms/TextField'
|
||||
import {useRefreshOnFocus} from '#/components/hooks/useRefreshOnFocus'
|
||||
import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus'
|
||||
import {SettingsSliderVertical_Stroke2_Corner0_Rounded as SettingsSlider} from '#/components/icons/SettingsSlider'
|
||||
import {Link} from '#/components/Link'
|
||||
|
@ -75,7 +76,9 @@ export function MessagesScreen({navigation}: Props) {
|
|||
fetchNextPage,
|
||||
error,
|
||||
refetch,
|
||||
} = useListConvos()
|
||||
} = useListConvos({refetchInterval: 15_000})
|
||||
|
||||
useRefreshOnFocus(refetch)
|
||||
|
||||
const isError = !!error
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue