Skip to content

Commit

Permalink
0.7.10 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-cen committed Apr 13, 2023
1 parent 2e6605e commit 91b228c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41436,6 +41436,7 @@ var FileLinkView = class extends import_obsidian36.ItemView {
// src/utils/file.ts
var import_obsidian37 = require("obsidian");
var tFileToAFile = (file) => {
var _a2, _b2;
if (!file)
return null;
if (file instanceof import_obsidian37.TFile && file.stat) {
Expand All @@ -41452,7 +41453,7 @@ var tFileToAFile = (file) => {
isFolder: true,
name: file.name,
path: file.path,
parent: file.parent.path
parent: (_b2 = (_a2 = file.parent) == null ? void 0 : _a2.path) != null ? _b2 : "/"
};
};
var defaultNoteFolder = (plugin, activeFile2) => {
Expand Down Expand Up @@ -41556,7 +41557,7 @@ var deleteFiles = (plugin, files) => {
});
};
var deleteFile = (plugin, file) => {
let deleteOption = plugin.settings.deleteFileOption;
const deleteOption = plugin.settings.deleteFileOption;
if (deleteOption === "permanent") {
return plugin.app.vault.delete(file, true);
} else if (deleteOption === "system-trash") {
Expand All @@ -41571,7 +41572,7 @@ var openFile = async (file, plugin, newLeaf) => {
var openSpace = async (spaceName, plugin, newLeaf) => {
if (!plugin.settings.contextEnabled)
return;
let leaf = app.workspace.getLeaf(newLeaf);
const leaf = app.workspace.getLeaf(newLeaf);
const viewType = CONTEXT_VIEW_TYPE;
app.workspace.setActiveLeaf(leaf, { focus: true });
await leaf.setViewState({
Expand All @@ -41582,13 +41583,13 @@ var openSpace = async (spaceName, plugin, newLeaf) => {
if (platformIsMobile()) {
app.workspace.leftSplit.collapse();
}
let evt = new CustomEvent(eventTypes.activePathChange, {
const evt = new CustomEvent(eventTypes.activePathChange, {
detail: { path: pathByString(plugin, spaceContextPathFromName(spaceName)) }
});
window.dispatchEvent(evt);
};
var openURL = async (url) => {
let leaf = app.workspace.getLeaf(false);
const leaf = app.workspace.getLeaf(false);
if (url.endsWith(".md")) {
const viewType = FILE_VIEW_TYPE;
app.workspace.setActiveLeaf(leaf, { focus: true });
Expand Down

0 comments on commit 91b228c

Please sign in to comment.