Skip to content

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

open note instantly

ammarahm-ed16ea815779cc
diff --git a/apps/mobile/src/views/Editor/EditorOverlay.js b/apps/mobile/src/views/Editor/EditorOverlay.js
index ca86f2f1d..91a47e6be 100644
--- a/apps/mobile/src/views/Editor/EditorOverlay.js
+++ b/apps/mobile/src/views/Editor/EditorOverlay.js
@@ -35,7 +35,6 @@ const EditorOverlay = () => {
clearTimeout(timer);
clearTimeout(timerError);
setError(false);
- await sleep(500);
timing(opacity, {
toValue: 0,
duration: 150,
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index a15d8c5f1..3b976f485 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -108,7 +108,7 @@ export const CHECK_STATUS = `(function() {
});
window.ReactNativeWebView.postMessage(msg)
- },100)
+ },1)
})();`;
export function getNote() {
@@ -221,8 +221,9 @@ export const loadNote = async item => {
}
eSendEvent('loadingNote', item);
if (getNote()) {
- await clearEditor(true, false);
+ await clearEditor(true, false,true);
}
+ console.log('cleared editor')
noteEdited = false;
await setNote(item);
webviewInit = false;
@@ -249,6 +250,7 @@ const checkStatus = async noreset => {
clearTimeout(webviewTimer);
webviewTimer = null;
resolve(true);
+ console.log('webview is running fine')
eUnSubscribeEvent('webviewOk', onWebviewOk);
};
eSubscribeEvent('webviewOk', onWebviewOk);
@@ -460,6 +462,7 @@ export async function clearEditor(
}
};
if (immediate) {
+ console.log('clearing');
return func();
} else {
cTimeout = setTimeout(func, 500);