Merge pull request #779 from ethereum/filevents

file events from provider do not trigger filemanager events
pull/5370/head
bunsenstraat 4 years ago committed by GitHub
commit f40e9d297b
  1. 8
      apps/remix-ide/src/app/files/fileManager.js

@ -271,6 +271,7 @@ class FileManager extends Plugin {
this._deps.browserExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.localhostExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.browserExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.browserExplorer.event.register('fileAdded', (path) => { this.fileAddedEvent(path) })
this._deps.localhostExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.localhostExplorer.event.register('errored', (event) => { this.removeTabsOf(this._deps.localhostExplorer) })
this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) })
@ -281,9 +282,12 @@ class FileManager extends Plugin {
this.switchFile = this.open
}
fileAddedEvent (path) {
this.emit('fileAdded', path)
}
fileChangedEvent (path) {
// @todo(#2386) use only for discard changes function.
// this.syncEditor(path)
this.emit('currentFileChanged', path)
}
fileRenamedEvent (oldName, newName, isFolder) {

Loading…
Cancel
Save