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
perf: do not wait for default notes to load
thecodrrc86450daed26
diff --git a/apps/web/src/common/db.js b/apps/web/src/common/db.jsindex b39973a06..74c3cca9a 100644--- a/apps/web/src/common/db.js+++ b/apps/web/src/common/db.js@@ -2,6 +2,7 @@ import StorageInterface from "../interfaces/storage";import EventSource from "eventsource";import Config from "../utils/config";import http from "notes-core/utils/http";+import { EV, EVENTS } from "notes-core/common";/*** @type {import("notes-core/api").default}@@ -26,8 +27,7 @@ function initializeDatabase() {if (!isAppHydrated()) {try {- await loadDefaultNotes(db);- setAppHydrated();+ loadDefaultNotes(db);} catch (e) {}}});@@ -58,7 +58,9 @@ async function loadDefaultNotes(db) {if (note.autoOpen) autoOpenId = id;}+ EV.publish(EVENTS.appRefreshRequested);if (autoOpenId) quickNavigate(`/notes/${autoOpenId}/edit`);+ setAppHydrated();}function quickNavigate(url) {