mirror of
https://github.com/mfarr/obsidian-archive.git
synced 2026-07-22 05:41:33 +00:00
Clean up old promise code
This commit is contained in:
parent
7ac0a52fd4
commit
92db98f125
1 changed files with 7 additions and 6 deletions
13
main.ts
13
main.ts
|
|
@ -38,7 +38,7 @@ export default class SimpleArchiver extends Plugin {
|
|||
|
||||
if (canBeArchived && view.file != null) {
|
||||
if (!checking) {
|
||||
this.moveToArchive(view.file).then();
|
||||
this.moveToArchive(view.file);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -88,11 +88,12 @@ export default class SimpleArchiver extends Plugin {
|
|||
await this.app.vault.createFolder(destinationPath);
|
||||
}
|
||||
|
||||
await this.app.fileManager
|
||||
.renameFile(file, `${this.settings.archiveFolder}/${file.path}`)
|
||||
.then(() => {
|
||||
new Notice(`${file.name} archived`);
|
||||
});
|
||||
await this.app.fileManager.renameFile(
|
||||
file,
|
||||
`${this.settings.archiveFolder}/${file.path}`
|
||||
);
|
||||
|
||||
new Notice(`${file.name} archived`);
|
||||
}
|
||||
|
||||
async loadSettings() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue