remove ensureDeactivated

pull/5370/head
yann300 4 years ago
parent 528e42bbef
commit 6c40c2a62b
  1. 8
      apps/remix-ide/src/app/files/remixd-handle.js
  2. 7
      apps/remix-ide/src/remixAppManager.js

@ -40,7 +40,7 @@ export class RemixdHandle extends WebsocketPlugin {
deactivate () {
this.fileSystemExplorer.hide()
if (super.socket) super.deactivate()
this.appManager.ensureDeactivated('git')
this.call('manager', 'deactivatePlugin', 'git')
this.locahostProvider.close((error) => {
if (error) console.log(error)
})
@ -52,8 +52,8 @@ export class RemixdHandle extends WebsocketPlugin {
}
async canceled () {
this.appManager.ensureDeactivated('remixd')
this.appManager.ensureDeactivated('git')
this.call('manager', 'deactivatePlugin', 'remixd')
this.call('manager', 'deactivatePlugin', 'git')
}
/**
@ -84,7 +84,7 @@ export class RemixdHandle extends WebsocketPlugin {
}
}, 3000)
this.locahostProvider.init(_ => this.fileSystemExplorer.ensureRoot())
this.appManager.ensureActivated('git')
this.call('manager', 'activatePlugin', 'git')
}
}
if (this.locahostProvider.isConnected()) {

@ -34,7 +34,7 @@ export class RemixAppManager extends PluginManager {
async canDeactivatePlugin (from, to) {
if (requiredModules.includes(to.name)) return false
return from.name === 'manager'
return isNative(from.name)
}
async canCall (from, to, method, message) {
@ -70,11 +70,6 @@ export class RemixAppManager extends PluginManager {
this.event.emit('deactivate', plugin)
}
async ensureDeactivated (apiName) {
await this.deactivatePlugin(apiName)
this.event.emit('ensureDeactivated', apiName)
}
isRequired (name) {
return requiredModules.includes(name)
}

Loading…
Cancel
Save