Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix(web): ensure default memo visibility is correctly applied (#5623)

Kaki021122ac9427339
diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx
index 53e70b00f..e15e37ad0 100644
--- a/web/src/components/MemoEditor/index.tsx
+++ b/web/src/components/MemoEditor/index.tsx
@@ -96,6 +96,9 @@ const MemoEditorImpl: React.FC<MemoEditorProps> = ({
// Reset editor state to initial values
dispatch(actions.reset());
+ if (!memoName && defaultVisibility) {
+ dispatch(actions.setMetadata({ visibility: defaultVisibility }));
+ }
// Notify parent component of successful save
onConfirm?.(result.memoName);