mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 09:53:30 +00:00
Fix to Sync Subscription
This commit is contained in:
parent
69dd2e3106
commit
373ea6d229
|
@ -1,6 +1,6 @@
|
|||
import { useNavigation } from '@react-navigation/native';
|
||||
import { AppLogo } from '@sd/assets/images';
|
||||
import { useLibraryMutation } from '@sd/client';
|
||||
import { useLibraryMutation, useLibraryQuery } from '@sd/client';
|
||||
import { Image } from 'expo-image';
|
||||
import React, { useEffect } from 'react';
|
||||
import { Dimensions, Text, View } from 'react-native';
|
||||
|
@ -36,6 +36,7 @@ const BackfillWaiting = () => {
|
|||
|
||||
const enableSync = useLibraryMutation(['sync.backfill'], {
|
||||
onSuccess: () => {
|
||||
syncEnabled.refetch();
|
||||
navigation.navigate('Root', {
|
||||
screen: 'Home',
|
||||
params: {
|
||||
|
@ -48,6 +49,8 @@ const BackfillWaiting = () => {
|
|||
}
|
||||
});
|
||||
|
||||
const syncEnabled = useLibraryQuery(['sync.enabled']);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
await enableSync.mutateAsync(null);
|
||||
|
|
Loading…
Reference in a new issue