Commit bd27e288 authored by filip mertens's avatar filip mertens

fix for not deactivating

rm console
parent ac18b5dd
......@@ -108,7 +108,7 @@ class PluginManagerComponent extends ViewPlugin {
}
deactivateP (name) {
this.appManager.deactivatePlugin(name)
this.call('manager', 'deactivatePlugin', name)
_paq.push(['trackEvent', 'manager', 'deactivate', name])
}
......
......@@ -128,7 +128,7 @@ export class TabProxy extends Plugin {
() => this.event.emit('switchApp', name),
() => {
this.event.emit('closeApp', name)
this.appManager.deactivatePlugin(name)
this.call('manager', 'deactivatePlugin', name)
},
icon
)
......
......@@ -52,6 +52,16 @@ export class RemixAppManager extends PluginManager {
return isNative(from.name)
}
async deactivatePlugin (name) {
const [to, from] = [
await this.getProfile(name),
await this.getProfile(this.requestFrom)
]
if (this.canDeactivatePlugin(from, to)) {
await this.toggleActive(name)
}
}
async canCall (from, to, method, message) {
// Make sure the caller of this methods is the target plugin
if (to !== this.currentRequest.from) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment