From 1ea69dd5042327b4403e3c95330708ae03196dd5 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Thu, 11 May 2017 10:20:33 -0400 Subject: [PATCH] Rename functions to be less wordy --- src/engine/runtime.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 1eebdfe1c..48d2da5cd 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -688,9 +688,9 @@ class Runtime extends EventEmitter { this._updateGlows(doneThreads); // Add done threads so that even if a thread finishes within 1 frame, the green // flag will still indicate that a script ran. - this._maybeEmitProjectRunStartOrStop( - this.threads.length - this._getMonitorThreadCount(this.threads) + - doneThreads.length - this._getMonitorThreadCount(doneThreads)); + this._emitProjectRunStatus( + this.threads.length + doneThreads.length - + this._getMonitorThreadCount([...this.threads, ...doneThreads])); if (this.renderer) { // @todo: Only render when this.redrawRequested or clones rendered. this.renderer.draw(); @@ -805,7 +805,7 @@ class Runtime extends EventEmitter { * * @param {number} nonMonitorThreadCount The new nonMonitorThreadCount */ - _maybeEmitProjectRunStartOrStop (nonMonitorThreadCount) { + _emitProjectRunStatus (nonMonitorThreadCount) { if (this._nonMonitorThreadCount === 0 && nonMonitorThreadCount > 0) { this.emit(Runtime.PROJECT_RUN_START); }