Desktop: Resolves #10746: Fix "View OCR text" not present in context menu when right-clicking an image (#10842)

pull/10849/head
Henry Heino 2024-08-08 12:02:08 -07:00 committed by GitHub
parent 0caecedb8f
commit a1aa4f78c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,9 @@ export function menuItems(dispatch: Function, htmlToMd: HtmlToMarkdownHandler, m
bridge().showInfoMessageBox(_('This attachment does not have OCR data (Status: %s)', resourceOcrStatusToString(resource.ocr_status)));
}
},
isActive: (itemType: ContextMenuItemType, _options: ContextMenuOptions) => itemType === ContextMenuItemType.Resource,
isActive: (itemType: ContextMenuItemType, options: ContextMenuOptions) => {
return itemType === ContextMenuItemType.Resource || (itemType === ContextMenuItemType.Image && options.resourceId);
},
},
copyPathToClipboard: {
label: _('Copy path to clipboard'),