From a138b92b1b639de14d1a361b3968ca186f4cbe28 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:54:39 -0700 Subject: [PATCH] Desktop: Fixes #8541: Fix toggle external editing button always disabled in rich text editor (#8595) --- packages/app-desktop/commands/toggleExternalEditing.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/app-desktop/commands/toggleExternalEditing.ts b/packages/app-desktop/commands/toggleExternalEditing.ts index 506cd072f..234c9503b 100644 --- a/packages/app-desktop/commands/toggleExternalEditing.ts +++ b/packages/app-desktop/commands/toggleExternalEditing.ts @@ -2,7 +2,6 @@ import CommandService, { CommandRuntime, CommandDeclaration } from '@joplin/lib/ import { _ } from '@joplin/lib/locale'; import { stateUtils } from '@joplin/lib/reducer'; import { DesktopCommandContext } from '../services/commands/types'; -import { enabledCondition } from '../gui/NoteEditor/editorCommandDeclarations'; export const declaration: CommandDeclaration = { name: 'toggleExternalEditing', @@ -23,7 +22,7 @@ export const runtime = (): CommandRuntime => { void CommandService.instance().execute('startExternalEditing', noteId); } }, - enabledCondition: enabledCondition(declaration.name), + enabledCondition: 'oneNoteSelected && !noteIsReadOnly && (!modalDialogVisible || gotoAnythingVisible)', mapStateToTitle: (state: any) => { const noteId = stateUtils.selectedNoteId(state); return state.watchedNoteFiles.includes(noteId) ? _('Stop') : '';