You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
This commit is contained in:
@@ -180,6 +180,10 @@ export default class Plugin {
|
||||
this.viewControllers_[v.handle] = v;
|
||||
}
|
||||
|
||||
public removeViewController(v: ViewController) {
|
||||
delete this.viewControllers_[v.handle];
|
||||
}
|
||||
|
||||
public hasViewController(handle: ViewHandle) {
|
||||
return !!this.viewControllers_[handle];
|
||||
}
|
||||
@@ -229,6 +233,10 @@ export default class Plugin {
|
||||
this.onUnloadListeners_.push(callback);
|
||||
}
|
||||
|
||||
public removeOnUnloadListener(callback: OnUnloadListener) {
|
||||
this.onUnloadListeners_ = this.onUnloadListeners_.filter(other => other !== callback);
|
||||
}
|
||||
|
||||
public onUnload() {
|
||||
for (const callback of this.onUnloadListeners_) {
|
||||
callback();
|
||||
|
||||
Reference in New Issue
Block a user