clean up after ourselves when the plugin is disabled

This commit is contained in:
2026-07-19 20:16:55 +06:00
parent dc3c5428e2
commit 2cbc29c4e9
+5
View File
@@ -23,6 +23,11 @@ module.exports = class RibbonOrderLock extends Plugin {
});
}
onunload() {
this.observer?.disconnect();
this.app.workspace.leftRibbon.onChange = this.originalOnChange;
}
observeRibbon() {
const ribbon = this.app.workspace.leftRibbon;
const containerEl = ribbon.ribbonItemsEl;