fix for not deactivating

rm console
pull/5370/head
filip mertens 4 years ago
parent 8733900296
commit 6e5622a3b9
  1. 2
      apps/remix-ide/src/app/components/plugin-manager-component.js
  2. 2
      apps/remix-ide/src/app/panels/tab-proxy.js
  3. 10
      apps/remix-ide/src/remixAppManager.js

@ -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) {

Loading…
Cancel
Save