Changed switchFile event to openFile event

pull/4/head
ioedeveloper 5 years ago
parent b94fe92d79
commit fc09e7e9d0
  1. 2
      src/app/files/file-explorer.js
  2. 2
      src/app/panels/main-view.js
  3. 4
      src/app/panels/tab-proxy.js

@ -285,7 +285,7 @@ function fileExplorer (localRegistry, files, menuItems) {
const removeFile = await fileManager.remove(key)
if (!removeFile) {
tooltip(`failed to remove file ${key}.`)
tooltip(`Failed to remove file ${key}.`)
} else {
const { type } = fileManager.currentFileProvider()
self.updatePath(type)

@ -61,7 +61,7 @@ export class MainView {
self._view.mainPanel.style.display = 'none'
self._components.contextView.show()
})
self.tabProxy.event.on('switchFile', (file) => {
self.tabProxy.event.on('openFile', (file) => {
self._view.editor.style.display = 'block'
self._view.mainPanel.style.display = 'none'
self._components.contextView.show()

@ -35,7 +35,7 @@ export class TabProxy {
}
this.addTab(file, '', () => {
this.fileManager.open(file)
this.event.emit('switchFile', file)
this.event.emit('openFile', file)
},
() => {
this.fileManager.closeFile(file)
@ -48,7 +48,7 @@ export class TabProxy {
// should change the tab title too
this.addTab(newName, '', () => {
this.fileManager.open(newName)
this.event.emit('switchFile', newName)
this.event.emit('openFile', newName)
},
() => {
this.fileManager.closeFile(newName)

Loading…
Cancel
Save