Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

do not show sync complete toast

ammarahm-ed10b975bf625f
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index 63d452c82..f0183411e 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -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={
diff --git a/apps/mobile/src/services/Sync.js b/apps/mobile/src/services/Sync.js
index d129abb32..5380b5f00 100644
--- a/apps/mobile/src/services/Sync.js
+++ b/apps/mobile/src/services/Sync.js
@@ -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) {