Commit 41790513 authored by yann300's avatar yann300

fix recorder count

parent 108e21de
...@@ -109,7 +109,6 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) { ...@@ -109,7 +109,6 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
function clearInstanceList (self) { function clearInstanceList (self) {
event.trigger('clearInstance', []) event.trigger('clearInstance', [])
self._view.recorderCount.innerText = 0
} }
function setFinalContext () { function setFinalContext () {
...@@ -200,6 +199,10 @@ function makeRecorder (appAPI, appEvents, opts, self) { ...@@ -200,6 +199,10 @@ function makeRecorder (appAPI, appEvents, opts, self) {
self.data.count = count self.data.count = count
self._view.recorderCount.innerText = count self._view.recorderCount.innerText = count
}) })
recorder.event.register('cleared', () => {
self.data.count = 0
self._view.recorderCount.innerText = 0
})
var css2 = csjs` var css2 = csjs`
.container {} .container {}
.runTxs {} .runTxs {}
...@@ -225,7 +228,6 @@ function makeRecorder (appAPI, appEvents, opts, self) { ...@@ -225,7 +228,6 @@ function makeRecorder (appAPI, appEvents, opts, self) {
modalDialogCustom.alert('Failed to create file ' + newFile) modalDialogCustom.alert('Failed to create file ' + newFile)
} else { } else {
appAPI.switchFile(newFile) appAPI.switchFile(newFile)
self._view.recorderCount.innerText = 0
} }
}) })
} }
......
...@@ -168,6 +168,7 @@ class Recorder { ...@@ -168,6 +168,7 @@ class Recorder {
self.data._abis = {} self.data._abis = {}
self.data._contractABIReferences = {} self.data._contractABIReferences = {}
self.data._linkReferences = {} self.data._linkReferences = {}
self.event.trigger('cleared', [])
} }
/** /**
......
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