mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-24 07:29:30 +01:00
do not show sync complete toast
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import React, {useEffect, useRef, useState} from 'react';
|
||||
import {FlatList, RefreshControl, RefreshControlComponent, View} from 'react-native';
|
||||
import {
|
||||
FlatList,
|
||||
RefreshControl,
|
||||
RefreshControlComponent,
|
||||
View
|
||||
} from 'react-native';
|
||||
import {notesnook} from '../../../e2e/test.ids';
|
||||
import {useTracked} from '../../provider';
|
||||
import {useUserStore} from '../../provider/stores';
|
||||
import {eSendEvent} from '../../services/EventManager';
|
||||
import Sync from '../../services/Sync';
|
||||
import {db} from '../../utils/database';
|
||||
@@ -76,6 +82,7 @@ const SimpleList = ({
|
||||
const [_loading, _setLoading] = useState(true);
|
||||
//const refreshing = false;
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const syncing = useUserStore(state => state.syncing);
|
||||
|
||||
useEffect(() => {
|
||||
let timeout = null;
|
||||
@@ -158,7 +165,7 @@ const SimpleList = ({
|
||||
tintColor={colors.accent}
|
||||
colors={[colors.accent]}
|
||||
onRefresh={_onRefresh}
|
||||
refreshing={refreshing}
|
||||
refreshing={refreshing || syncing}
|
||||
/>
|
||||
}
|
||||
ListEmptyComponent={
|
||||
|
||||
@@ -32,12 +32,6 @@ const run = async (context = 'global', forced) => {
|
||||
if (typeof res === 'string') throw new Error(res);
|
||||
retryCount = 0;
|
||||
result = true;
|
||||
ToastEvent.show({
|
||||
heading: 'Sync complete',
|
||||
type: 'success',
|
||||
message: 'All your notes are encrypted and synced!',
|
||||
context: context
|
||||
});
|
||||
} catch (e) {
|
||||
result = false;
|
||||
if (e.message !== 'Sync already running' && userstore.user) {
|
||||
|
||||
Reference in New Issue
Block a user