Commit 5dd74bc9 authored by yann300's avatar yann300

fix fileExternakkyChanged handler

parent 25dc9104
...@@ -64,8 +64,8 @@ function fileExplorer (appAPI, files) { ...@@ -64,8 +64,8 @@ function fileExplorer (appAPI, files) {
return yo`<div>This file has been changed outside of Remix IDE.</div>` return yo`<div>This file has been changed outside of Remix IDE.</div>`
} }
this.files.event.register('fileExternallyChanged', (path, content) => { this.files.event.register('fileExternallyChanged', (path, file) => {
if (appAPI.currentFile() === path && appAPI.currentContent() !== content) { if (appAPI.config.get('currentFile') === path && appAPI.currentContent() !== file.content) {
modalDialog(path + ' changed', remixdDialog(), modalDialog(path + ' changed', remixdDialog(),
{ {
label: 'Keep the content displayed in Remix', label: 'Keep the content displayed in Remix',
...@@ -74,7 +74,7 @@ function fileExplorer (appAPI, files) { ...@@ -74,7 +74,7 @@ function fileExplorer (appAPI, files) {
{ {
label: 'Replace by the new content', label: 'Replace by the new content',
fn: () => { fn: () => {
appAPI.setText(content) appAPI.setText(file.content)
} }
} }
) )
...@@ -292,9 +292,6 @@ function fileExplorer (appAPI, files) { ...@@ -292,9 +292,6 @@ function fileExplorer (appAPI, files) {
} }
} }
function fileFocus (path) { function fileFocus (path) {
var filepath = appAPI.config.get('currentFile') var filepath = appAPI.config.get('currentFile')
if (filepath === path) return if (filepath === path) return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment