From 97ca116868d791c14250fd1931b6f1f7bea5fd3f Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Thu, 7 Aug 2025 11:17:53 -0300 Subject: [PATCH 1/2] chore: clean up advanced checklist canEdit logic --- packages/com.sncommunity.advanced-checklist/src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/com.sncommunity.advanced-checklist/src/index.tsx b/packages/com.sncommunity.advanced-checklist/src/index.tsx index 568bcaae..39919bd0 100644 --- a/packages/com.sncommunity.advanced-checklist/src/index.tsx +++ b/packages/com.sncommunity.advanced-checklist/src/index.tsx @@ -65,7 +65,8 @@ const TaskEditor: React.FC = () => { onNoteValueChange: async (currentNote: any) => { note.current = currentNote - const editable = !currentNote.content.appData['org.standardnotes.sn'].locked ?? true + const locked = currentNote.content.appData['org.standardnotes.sn'].locked ?? false + const editable = !locked const spellCheckEnabled = currentNote.content.spellcheck dispatch(setCanEdit(editable)) From 69aa1d6194c5a94b46b2e90c817fc23c601c8e15 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Thu, 7 Aug 2025 16:13:57 -0300 Subject: [PATCH 2/2] chore: remove unnecessary conditional from advanced checklist logic --- .../src/features/tasks/tasks-slice.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/com.sncommunity.advanced-checklist/src/features/tasks/tasks-slice.ts b/packages/com.sncommunity.advanced-checklist/src/features/tasks/tasks-slice.ts index bc5f4a22..4b1712d3 100644 --- a/packages/com.sncommunity.advanced-checklist/src/features/tasks/tasks-slice.ts +++ b/packages/com.sncommunity.advanced-checklist/src/features/tasks/tasks-slice.ts @@ -333,13 +333,11 @@ const tasksSlice = createSlice({ groups: parsedState?.groups ?? [], } - if (newState !== initialState) { - state.schemaVersion = newState.schemaVersion - state.groups = newState.groups - state.defaultSections = newState.defaultSections - state.initialized = true - delete state.lastError - } + state.schemaVersion = newState.schemaVersion + state.groups = newState.groups + state.defaultSections = newState.defaultSections + state.initialized = true + delete state.lastError } catch (error: any) { state.initialized = false state.lastError = `An error has occurred while parsing the note's content: ${error}`