Skip to content

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

change save timer to 250ms

ammarahm-ed2987a538194e
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index b6ceb1db5..2c0e2e136 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -456,7 +456,7 @@ function onNoteChange() {
if (noteEdited) {
saveNote();
}
- }, 100);
+ }, 250);
}
let cTimeout = null;
@@ -568,6 +568,8 @@ export async function saveNote(preventUpdate) {
if (!noteEdited) return;
if (isSaving && !id) return;
isSaving = true;
+ console.log('saving note now', Date.now());
+
try {
if (id && !db.notes.note(id)) {
clearNote();
@@ -582,7 +584,6 @@ export async function saveNote(preventUpdate) {
}
locked = _note.locked;
}
-
let noteData = {
title,
content: {
@@ -594,6 +595,10 @@ export async function saveNote(preventUpdate) {
if (!locked) {
let noteId = await db.notes.add(noteData);
+
+ let _d = await db.content.raw(note.contentId);
+
+ console.log("COTENT_STATUSS:", _d.data)
if (!id || saveCounter < 3) {
Navigation.setRoutesToUpdate([
Navigation.routeNames.Notes,
@@ -734,12 +739,15 @@ const loadNoteInEditor = async (keepHistory = true) => {
`
);
} else {
+
post('html', content.data);
}
if (id) {
db.attachments.downloadImages(id);
}
+
+
setColors();
tiny.call(
EditorWebView,