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
mobile: fix tab bugs
Ammar Ahmed2ce31fc81c2e
diff --git a/apps/mobile/app/components/sheets/editor-tabs/index.tsx b/apps/mobile/app/components/sheets/editor-tabs/index.tsxindex 4590d9355..931f90cdb 100644--- a/apps/mobile/app/components/sheets/editor-tabs/index.tsx+++ b/apps/mobile/app/components/sheets/editor-tabs/index.tsx@@ -33,6 +33,7 @@ import Paragraph from "../../ui/typography/paragraph";type TabItem = {id: number;noteId?: string;+ previewTab?: boolean;};const TabItemComponent = (props: {@@ -59,6 +60,11 @@ const TabItemComponent = (props: {props.close?.();}}}+ onLongPress={() => {+ useTabStore.getState().updateTab(props.tab.id, {+ previewTab: false+ });+ }}><Viewstyle={{@@ -73,6 +79,9 @@ const TabItemComponent = (props: {? colors.selected.paragraph: colors.primary.paragraph}+ style={{+ fontStyle: props.tab.previewTab ? "italic" : "normal"+ }}size={SIZE.md}>{item?.title || "New note"}diff --git a/apps/mobile/app/screens/editor/tiptap/use-editor.ts b/apps/mobile/app/screens/editor/tiptap/use-editor.tsindex ba0f54bf8..2b520a085 100644--- a/apps/mobile/app/screens/editor/tiptap/use-editor.ts+++ b/apps/mobile/app/screens/editor/tiptap/use-editor.ts@@ -278,7 +278,7 @@ export const useEditor = (}if (!locked) {- id = await db.notes?.add(noteData);+ id = await db.notes?.add({ ...noteData });if (!note && id) {editorSessionHistory.newSession(id);if (id) {@@ -300,7 +300,6 @@ export const useEditor = (}if (!noteData.title) {- console.log("posting title to tab", tabId);postMessage(EditorEvents.title,currentNotes.current[id]?.title,