Merge pull request #779 from ethereum/filevents

file events from provider do not trigger filemanager events
pull/790/head
bunsenstraat 4 years ago committed by GitHub
commit cf364f1517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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