A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
some minor fixes
ammarahm-ed8f2af153f0ea
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.jsindex 467f03f12..87dce63ec 100644--- a/apps/mobile/src/components/SimpleList/index.js+++ b/apps/mobile/src/components/SimpleList/index.js@@ -80,8 +80,6 @@ const SimpleList = ({const {colors} = state;const scrollRef = useRef();const [_loading, _setLoading] = useState(true);- //const refreshing = false;- const [refreshing, setRefreshing] = useState(false);const syncing = useUserStore(state => state.syncing);useEffect(() => {@@ -116,9 +114,7 @@ const SimpleList = ({);const _onRefresh = async () => {- setRefreshing(true);await Sync.run();- setRefreshing(false);if (refreshCallback) {refreshCallback();}@@ -166,7 +162,7 @@ const SimpleList = ({colors={[colors.accent]}progressBackgroundColor={colors.nav}onRefresh={_onRefresh}- refreshing={refreshing || syncing}+ refreshing={syncing}/>}ListEmptyComponent={diff --git a/apps/mobile/src/services/Sync.js b/apps/mobile/src/services/Sync.jsindex 5380b5f00..53c03533a 100644--- a/apps/mobile/src/services/Sync.js+++ b/apps/mobile/src/services/Sync.js@@ -1,3 +1,4 @@+import Clipboard from '@react-native-clipboard/clipboard';import NetInfo from '@react-native-community/netinfo';import {initialize, useUserStore} from '../provider/stores';import {doInBackground} from '../utils';@@ -14,13 +15,13 @@ const run = async (context = 'global', forced) => {return true;}userstore.setSyncing(true);-+ let errorStack = null;try {let res = await doInBackground(async () => {try {return await db.sync(true, forced);} catch (e) {- console.log(e.stack);+ errorStack = e.stack;return e.message;}});@@ -41,7 +42,18 @@ const run = async (context = 'global', forced) => {ToastEvent.show({heading: 'Sync failed',message: e.message,- context: context+ context: context,+ actionText: 'Copy log',+ func: () => {+ if (errorStack) {+ Clipboard.setString(errorStack);+ ToastEvent.show({+ heading: 'Logs copied!',+ type: 'success',+ context: 'global'+ });+ }+ }});}}diff --git a/apps/mobile/src/views/Search/searchbar.js b/apps/mobile/src/views/Search/searchbar.jsindex 7a29c5485..dde3cbdbc 100644--- a/apps/mobile/src/views/Search/searchbar.js+++ b/apps/mobile/src/views/Search/searchbar.js@@ -49,8 +49,8 @@ export const SearchBar = () => {return () => {eUnSubscribeEvent(eScrollEvent, onScroll);};- });-+ },[]);+const onChangeText = value => {setValue(value);search(value);