Fixed ribbon button not disappearing

This commit is contained in:
Simon Cambier
2022-10-24 06:32:56 +02:00
parent 74d4d41807
commit 6af0ad9178
2 changed files with 12 additions and 2 deletions

View File

@@ -200,7 +200,7 @@ export class SettingsTab extends PluginSettingTab {
new Setting(containerEl)
.setName('Show ribbon button')
.setDesc(
'Add a button on the sidebar to open the Vault search modal. Needs a restart to remove the button.'
'Add a button on the sidebar to open the Vault search modal.'
)
.addToggle(toggle =>
toggle.setValue(settings.ribbonIcon).onChange(async v => {
@@ -208,6 +208,8 @@ export class SettingsTab extends PluginSettingTab {
await saveSettings(this.plugin)
if (v) {
this.plugin.addRibbonButton()
} else {
this.plugin.removeRibbonButton()
}
})
)