mirror of
https://github.com/idanlib/ObsidianFastForwardLinkPlugin.git
synced 2026-07-22 11:30:28 +00:00
wrap delete note in setTimeout
This commit is contained in:
parent
dd4989d8cd
commit
6f34effaf5
2 changed files with 5 additions and 3 deletions
|
|
@ -41,7 +41,7 @@ export default class RedirectSettingsTab extends PluginSettingTab {
|
|||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Delete the _forwards Folder")
|
||||
.setName("Delete the _forwards folder")
|
||||
.setDesc(
|
||||
"Before uninstalling the plugin, manually delete the `_forwards` folder to remove unnecessary files. This cannot be undone."
|
||||
)
|
||||
|
|
|
|||
6
main.ts
6
main.ts
|
|
@ -137,7 +137,9 @@ export default class RedirectPlugin extends Plugin {
|
|||
this.app.workspace.on("file-open", this.redirectRef);
|
||||
}
|
||||
|
||||
await this.deleteNote(redirectingNote);
|
||||
setTimeout(async () => {
|
||||
await this.deleteNote(redirectingNote);
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
|
@ -169,7 +171,7 @@ export default class RedirectPlugin extends Plugin {
|
|||
|
||||
this.addCommand({
|
||||
id: "paste-redirect-syntax",
|
||||
name: "Paste Redirect Syntax onto Selection",
|
||||
name: "Paste redirect syntax onto selection",
|
||||
editorCallback: (editor, view) => {
|
||||
const selection = editor.getSelection();
|
||||
editor.replaceSelection(`::>[[${selection}]]`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue