You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Chore: Apply changes from mobile plugins to lib/ and app-desktop/ (#10079)
This commit is contained in:
@@ -39,6 +39,7 @@ export default class Plugin {
|
||||
private contentScriptMessageListeners_: Record<string, Function> = {};
|
||||
private dataDir_: string;
|
||||
private dataDirCreated_ = false;
|
||||
private hasErrors_ = false;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
public constructor(baseDir: string, manifest: PluginManifest, scriptText: string, dispatch: Function, dataDir: string) {
|
||||
@@ -97,6 +98,14 @@ export default class Plugin {
|
||||
return Object.keys(this.viewControllers_).length;
|
||||
}
|
||||
|
||||
public get hasErrors(): boolean {
|
||||
return this.hasErrors_;
|
||||
}
|
||||
|
||||
public set hasErrors(hasErrors: boolean) {
|
||||
this.hasErrors_ = hasErrors;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
public on(eventName: string, callback: Function) {
|
||||
return this.eventEmitter_.on(eventName, callback);
|
||||
@@ -190,4 +199,11 @@ export default class Plugin {
|
||||
return this.contentScriptMessageListeners_[id](message);
|
||||
}
|
||||
|
||||
public onUnload() {
|
||||
this.dispatch_({
|
||||
type: 'PLUGIN_UNLOAD',
|
||||
pluginId: this.id,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user