Makes the Delete and reimport command work when in "reading" mode (pictured below)
Seeing as how readwise exports should generally be treated as read-only, i recently started using another obsidian plugin to force the view mode of my readwise exports into the "reading" mode (that plugin calls it obsidianUIMode: preview) - which led me to discovering this quirk (:bug:) in the obsidian-readwise plugin: it only worked when in "editing" mode.
This PR fixes that by changing the callback to checkCallback which is triggered regardless of the view mode instead of the original editorCheckCallback which "is only triggered when the user is in an editor".
I have tested this change in a test vault - it works :heavy_check_mark:
Here's proof - notice the icon i've circled, which indicates that this is in the "reading" mode (it is a book icon when in editing mode) :arrow_heading_down:
Makes the
Delete and reimport
command work when in "reading" mode (pictured below)Seeing as how readwise exports should generally be treated as read-only, i recently started using another obsidian plugin to force the view mode of my readwise exports into the "reading" mode (that plugin calls it
obsidianUIMode: preview
) - which led me to discovering this quirk (:bug:) in theobsidian-readwise
plugin: it only worked when in "editing" mode.This PR fixes that by changing the callback to
checkCallback
which is triggered regardless of the view mode instead of the originaleditorCheckCallback
which "is only triggered when the user is in an editor".I have tested this change in a test vault - it works :heavy_check_mark:
Here's proof - notice the icon i've circled, which indicates that this is in the "reading" mode (it is a book icon when in editing mode) :arrow_heading_down:![image](https://github.com/readwiseio/obsidian-readwise/assets/595711/175465ad-134c-4bd0-8723-10f6742bf1ee)