diff --git a/memento-note/components/note-inline-editor.tsx b/memento-note/components/note-inline-editor.tsx index 127c362..4aa004f 100644 --- a/memento-note/components/note-inline-editor.tsx +++ b/memento-note/components/note-inline-editor.tsx @@ -139,22 +139,6 @@ export function NoteInlineEditor({ const [fusionNotes, setFusionNotes] = useState>>([]) const [comparisonNotes, setComparisonNotes] = useState>>([]) - const noteContentRef = useRef(note.content) - const noteTitleRef = useRef(note.title) - useEffect(() => { - if (note.content !== noteContentRef.current || note.title !== noteTitleRef.current) { - clearTimeout(saveTimerRef.current) - setIsDirty(false) - setTitle(note.title || '') - setContent(note.content || '') - setCheckItems(note.checkItems || []) - setNoteType(note.type) - pendingRef.current = { title: note.title || '', content: note.content || '', checkItems: note.checkItems || [], isMarkdown: note.type === 'markdown', noteType: note.type } - noteContentRef.current = note.content - noteTitleRef.current = note.title - } - }, [note]) - const changeTitle = (t: string) => { setTitle(t); onChange?.(note.id, { title: t }) } const changeContent = (c: string) => { setContent(c); onChange?.(note.id, { content: c }) } const changeCheckItems = (ci: CheckItem[]) => { setCheckItems(ci); onChange?.(note.id, { checkItems: ci }) }