fix: use private _loaded to prevents false positive warning about not loaded St.Settings

This commit is contained in:
mara-li 2025-04-30 09:47:44 +02:00
parent 897918717d
commit ab861b615f
2 changed files with 4 additions and 3 deletions

View file

@ -29,8 +29,8 @@ export default class SimpleColoredFolder extends Plugin {
);
this.compiler = new ColorCompiler(this);
this.style = this.compiler.style;
if (!this.app.plugins.enabledPlugins.has("obsidian-style-settings")) {
const styleSettings = this.app.plugins.getPlugin("obsidian-style-settings");
if (!styleSettings?._loaded) {
new Notice(
sanitizeHTMLToDom(
dedent`<span class="spf-warning">${i18next.t("warning")}</span>`

View file

@ -22,7 +22,8 @@ export class SimpleColoredFolderSettingTab extends PluginSettingTab {
const { containerEl } = this;
containerEl.empty();
if (!this.app.plugins.enabledPlugins.has("obsidian-style-settings")) {
const styleSettings = this.app.plugins.getPlugin("obsidian-style-settings");
if (!styleSettings?._loaded) {
await MarkdownRenderer.render(this.app, dedent`> [!warning]
> ${i18next.t("notEnabled")}
>