mirror of https://github.com/tooot-app/app
Fix push page not refetching
This commit is contained in:
parent
0dacd5ec89
commit
2c96991ca0
|
@ -37,6 +37,7 @@ const TabMePush: React.FC = () => {
|
||||||
|
|
||||||
const appsQuery = useAppsQuery({
|
const appsQuery = useAppsQuery({
|
||||||
options: {
|
options: {
|
||||||
|
enabled: false,
|
||||||
onSuccess: async data => {
|
onSuccess: async data => {
|
||||||
if (data.vapid_key) {
|
if (data.vapid_key) {
|
||||||
await checkPush()
|
await checkPush()
|
||||||
|
@ -49,6 +50,9 @@ const TabMePush: React.FC = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
useEffect(() => {
|
||||||
|
appsQuery.refetch()
|
||||||
|
}, [])
|
||||||
|
|
||||||
const checkPush = async () => {
|
const checkPush = async () => {
|
||||||
const permissions = await Notifications.getPermissionsAsync()
|
const permissions = await Notifications.getPermissionsAsync()
|
||||||
|
|
Loading…
Reference in New Issue