You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Mobile: Support building for web (#10650)
This commit is contained in:
@ -51,7 +51,7 @@ export default class Joplin {
|
||||
this.imaging_ = new JoplinImaging(implementation.imaging);
|
||||
this.workspace_ = new JoplinWorkspace(plugin, store);
|
||||
this.filters_ = new JoplinFilters();
|
||||
this.commands_ = new JoplinCommands();
|
||||
this.commands_ = new JoplinCommands(plugin);
|
||||
this.views_ = new JoplinViews(implementation.joplin.views, plugin, store);
|
||||
this.interop_ = new JoplinInterop();
|
||||
this.settings_ = new JoplinSettings(plugin);
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import CommandService, { CommandContext, CommandDeclaration, CommandRuntime } from '../../CommandService';
|
||||
import { Command } from './types';
|
||||
import Plugin from '../Plugin';
|
||||
|
||||
/**
|
||||
* This class allows executing or registering new Joplin commands. Commands
|
||||
@ -59,6 +60,7 @@ import { Command } from './types';
|
||||
*
|
||||
*/
|
||||
export default class JoplinCommands {
|
||||
public constructor(private plugin_: Plugin) { }
|
||||
|
||||
/**
|
||||
* Executes the given command.
|
||||
@ -118,6 +120,9 @@ export default class JoplinCommands {
|
||||
|
||||
CommandService.instance().registerDeclaration(declaration);
|
||||
CommandService.instance().registerRuntime(declaration.name, runtime);
|
||||
this.plugin_.addOnUnloadListener(() => {
|
||||
CommandService.instance().unregisterRuntime(declaration.name);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user