modal.ts > modals.ts

This commit is contained in:
Simon Cambier
2022-04-24 08:51:51 +02:00
parent c287c58e7f
commit ae80b7a48f
4 changed files with 4 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import {
removeFromIndex,
removeFromIndexByPath,
} from './search'
import { OmnisearchInFileModal, OmnisearchVaultModal } from './modal'
import { OmnisearchInFileModal, OmnisearchVaultModal } from './modals'
export default class OmnisearchPlugin extends Plugin {
async onload(): Promise<void> {
@@ -22,6 +22,7 @@ export default class OmnisearchPlugin extends Plugin {
id: 'show-modal-infile',
name: 'In-file search',
checkCallback: (checking: boolean) => {
// Can only be shown when a note is active
const view = app.workspace.getActiveViewOfType(MarkdownView)
if (view) {
if (!checking) {