mirror of
https://github.com/unarray/file-tree-generator.git
synced 2026-07-22 08:40:29 +00:00
Use obsidian built-in sleep function
This commit is contained in:
parent
cd5c52740b
commit
2ba41d73fa
3 changed files with 3 additions and 8 deletions
|
|
@ -3,10 +3,8 @@ import { filter, getFilter } from "#/utils/filter";
|
|||
import { explorerEntityToCallout, filesToExplorerEntity } from "#/utils/parser";
|
||||
import { getFiles } from "#/utils/path";
|
||||
import { dialog } from "@electron/remote";
|
||||
import type { App, Editor } from "obsidian";
|
||||
import type { TextAreaComponent } from "obsidian";
|
||||
import { normalizePath } from "obsidian";
|
||||
import { Modal, Notice, Platform, Setting } from "obsidian";
|
||||
import type { TextAreaComponent, App, Editor } from "obsidian";
|
||||
import { Modal, Notice, Platform, Setting, normalizePath } from "obsidian";
|
||||
import { sep } from "path";
|
||||
|
||||
export class GenerateTree extends Modal {
|
||||
|
|
@ -82,6 +80,7 @@ export class GenerateTree extends Modal {
|
|||
|
||||
while (showNotice) {
|
||||
notice.setMessage(`🔎 Loading${".".repeat(dotCount)}`);
|
||||
|
||||
await sleep(400);
|
||||
|
||||
dotCount++;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
export * from "./sleep";
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export const sleep = (ms: number): Promise<void> => {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
};
|
||||
Loading…
Reference in a new issue