From 84f4369c0289c37407bc0217caf98ac8e48e8720 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 26 Jun 2023 16:14:07 +0100 Subject: [PATCH] add inner counter --- apps/remix-ide/src/app/tabs/analysis-tab.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/analysis-tab.js b/apps/remix-ide/src/app/tabs/analysis-tab.js index 4ffe2ec4c2..8f2174cd22 100644 --- a/apps/remix-ide/src/app/tabs/analysis-tab.js +++ b/apps/remix-ide/src/app/tabs/analysis-tab.js @@ -37,6 +37,7 @@ class AnalysisTab extends ViewPlugin { * @description Array of objects containing the results of Linting */ this.hints = [] + this.internalCount = 0 this.registry = Registry.getInstance() this.element = document.createElement('div') this.element.setAttribute('id', 'staticAnalyserView') @@ -68,7 +69,9 @@ class AnalysisTab extends ViewPlugin { }) : payloadType = 'warning' if (count > 0) { - this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: payloadType }) + console.log('staticAnaysisWarning', count) + this.internalCount = this.internalCount !== 0 ? count : count + this.emit('statusChanged', { key: this.internalCount, title: `${this.internalCount} warning${this.internalCount === 1 ? '' : 's'}`, type: payloadType }) } else if (count === 0) { this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' }) } else {