Skip to content

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

do not show loading when same note is already opened

ammarahm-eda1d432219939
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index f488ddf16..0a0bd7562 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -190,7 +190,11 @@ export const loadNote = async (item) => {
EditorWebView.current?.reload();
}
} else {
- eSendEvent('loadingNote', true);
+ if (id === item.id) {
+ return;
+ }
+ eSendEvent('loadingNote', item);
+
editing.isFocused = false;
clearTimer();
await setNote(item);
@@ -268,7 +272,7 @@ export const _onMessage = async (evt) => {
eSendEvent('editorScroll', message);
break;
case 'noteLoaded':
- eSendEvent('loadingNote', !message.value);
+ eSendEvent('loadingNote');
break;
case 'premium':
let user = await db.user.getUser();