Skip to content

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

mobile: reflected published note title in published section

kashaf-ansari-devd7e92346e52f
diff --git a/apps/mobile/app/components/sheets/publish-note/index.tsx b/apps/mobile/app/components/sheets/publish-note/index.tsx
index 328487a84..d5d8ab8c8 100644
--- a/apps/mobile/app/components/sheets/publish-note/index.tsx
+++ b/apps/mobile/app/components/sheets/publish-note/index.tsx
@@ -90,11 +90,20 @@ const PublishNoteSheet = ({
const formRef = useRef(
createFormRef({
- title: monograph?.title || note.title || "",
+ title: note.title || "",
password: ""
})
);
+ useEffect(() => {
+ if (!monographData.result) return;
+ const title = monograph?.title || note.title || "";
+ formRef.current.setValue("title", title);
+ setTimeout(() => {
+ titleInput.current?.setNativeProps({ text: title });
+ }, 50);
+ }, [monographData.result, monograph]);
+
useEffect(() => {
(async () => {
if (monograph) {