Skip to content

Commit 93930e0

Browse files
committed
feat: open not supported files in changed files modal in default app
1 parent 95cb53d commit 93930e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ class ChangedFilesModal extends FuzzySuggestModal<FileStatusResult> {
743743
super(plugin.app);
744744
this.plugin = plugin;
745745
this.changedFiles = changedFiles;
746-
this.setPlaceholder("Only files in vault can be openend!");
746+
this.setPlaceholder("Not supported files will be opened by default app!");
747747
}
748748

749749
getItems(): FileStatusResult[] {
@@ -766,7 +766,7 @@ class ChangedFilesModal extends FuzzySuggestModal<FileStatusResult> {
766766

767767
onChooseItem(item: FileStatusResult, _: MouseEvent | KeyboardEvent): void {
768768
if (this.plugin.app.metadataCache.getFirstLinkpathDest(item.path, "") == null) {
769-
new Notice("Can't open file in Obsidian");
769+
(this.app as any).openWithDefaultApp(item.path);
770770
} else {
771771
this.plugin.app.workspace.openLinkText(item.path, "/");
772772
}

0 commit comments

Comments
 (0)