From 3631f59d4cd98bda8e05df84dedfa46ec73328d2 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 8 Jul 2022 23:53:00 +0500 Subject: [PATCH] update title placeholder on save note --- apps/mobile/src/screens/editor/tiptap/useEditor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/mobile/src/screens/editor/tiptap/useEditor.ts b/apps/mobile/src/screens/editor/tiptap/useEditor.ts index 39935a03e..2267b051b 100644 --- a/apps/mobile/src/screens/editor/tiptap/useEditor.ts +++ b/apps/mobile/src/screens/editor/tiptap/useEditor.ts @@ -178,6 +178,9 @@ export const useEditor = ( if (!note && id) { currentNote.current = db.notes?.note(id).data as NoteType; state.current?.onNoteCreated && state.current.onNoteCreated(id); + if (!noteData.title) { + postMessage(EditorEvents.titleplaceholder, currentNote.current.title); + } } if (useEditorStore.getState().currentEditingNote !== id && isDefaultEditor) {