Skip to content

Commit c3fb140

Browse files
committed
Add notifications for delayed boot
1 parent d8fdf50 commit c3fb140

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

main.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default class MetaTitlePlugin extends Plugin implements PluginInterface {
8282
const delay = this.storage.get("boot").get("delay").value();
8383
const background = this.storage.get("boot").get("background").value();
8484
this.logger.log(`Plugin manual delay ${delay}`);
85-
const promise = new Promise(r =>
85+
let promise = new Promise(r =>
8686
setTimeout(() => {
8787
this.fc = Container.get(SI["feature:composer"]);
8888
this.mc = Container.get(SI["manager:composer"]);
@@ -91,6 +91,10 @@ export default class MetaTitlePlugin extends Plugin implements PluginInterface {
9191
r();
9292
}, delay)
9393
);
94+
if (delay > 0) {
95+
new Notice(`[${this.manifest.name}]\nWill be loaded in ${delay}ms. Background: ${background}`);
96+
promise = promise.then(() => new Notice(`[${this.manifest.name}]\nLoaded. Background: ${background}`));
97+
}
9498
return background ? null : promise;
9599
}
96100

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-front-matter-title-plugin",
33
"name": "Front Matter Title",
4-
"version": "3.13.0",
4+
"version": "3.13.1",
55
"minAppVersion": "1.7.4",
66
"description": "Lets you define a title in frontmatter to be displayed as the filename for explorer, graph, search and etc.",
77
"author": "Snezhig",

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-front-matter-title",
3-
"version": "3.13.0",
3+
"version": "3.13.1",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {

versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@
5757
"3.10.0": "1.5.3",
5858
"3.11.0": "1.7.4",
5959
"3.12.0": "1.7.4",
60-
"3.13.0": "1.7.4"
60+
"3.13.0": "1.7.4",
61+
"3.13.1": "1.7.4"
6162
}

0 commit comments

Comments
 (0)