fix: remove redundant note detail props

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-15 21:29:28 +02:00
parent cdfcd325a1
commit 77f858bff8
13 changed files with 12 additions and 49 deletions

View file

@ -32,7 +32,7 @@ export const useSetCheckboxInEditor = () => {
return useCallback(
({ lineInMarkdown, newCheckedState }: TaskCheckedEventPayload): void => {
changeEditorContent?.(({ markdownContent }) => {
const correctedLineIndex = lineInMarkdown + store.getState().noteDetails.frontmatterRendererInfo.lineOffset
const correctedLineIndex = lineInMarkdown + store.getState().noteDetails.startOfContentLineOffset
const edits = findCheckBox(markdownContent, correctedLineIndex)
.map(([startIndex, endIndex]) => createCheckboxContentEdit(startIndex, endIndex, newCheckedState))
.orElse([])