We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
custom-sort:plugin-unload
1 parent 0fb39ae commit bf4d43eCopy full SHA for bf4d43e
src/main.ts
@@ -683,6 +683,8 @@ export default class CustomSortPlugin
683
}
684
685
onunload() {
686
+ // Trigger "plugin-unload" event
687
+ this.app.workspace.trigger('custom-sort:plugin-unload');
688
689
690
onUserEnable() {
src/types/types.d.ts
@@ -62,4 +62,9 @@ declare module 'obsidian' {
62
interface MenuItem {
63
setSubmenu: () => Menu;
64
65
+
66
+ interface Workspace {
67
+ // Augmented event, triggered after unloading the plugin
68
+ on(name: 'custom-sort:plugin-unload', callback: () => unknown, ctx?: any): EventRef;
69
+ }
70
0 commit comments