Skip to content

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

editor: do not reopen last session on mobile

thecodrr51e5111ce607
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index 60bcdd952..e6f37ec66 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -7,6 +7,7 @@ import { db } from "../common";
import BaseStore from ".";
import Vault from "../common/vault.js";
import EditorNavigator from "../navigation/navigators/editornavigator";
+import { isMobile } from "../utils/dimensions";
const SESSION_STATES = { stale: "stale", new: "new" };
const DEFAULT_SESSION = {
@@ -35,6 +36,9 @@ class EditorStore extends BaseStore {
arePropertiesVisible = true;
openLastSession = async () => {
+ // Do not reopen last session on mobile
+ if(isMobile()) return;
+
const id = localStorage.getItem("lastOpenedNote");
if (!id) {
return EditorNavigator.navigate("editor");