UI: Fix an issue where loading chip lingers if change has no tasks Fire the 'tasks-loaded' event even when the change has no tasks as the logic to hide the loading chip depends on it. Change-Id: I4926a0ca7d4513622258b765a5e455fbb8ca1e6b
diff --git a/gr-task-plugin/gr-task-plugin.js b/gr-task-plugin/gr-task-plugin.js index 52b0a9b..671aa71 100644 --- a/gr-task-plugin/gr-task-plugin.js +++ b/gr-task-plugin/gr-task-plugin.js
@@ -142,19 +142,19 @@ if (taskPluginInfo) { this._tasks = this._addTasks(taskPluginInfo.roots); - document.dispatchEvent(new CustomEvent('tasks-loaded', { - detail: { - ready_count: this._ready_count, - fail_count: this._fail_count, - invalid_count: this._invalid_count, - waiting_count: this._waiting_count, - duplicate_count: this._duplicate_count, - pass_count: this._pass_count, - }, - composed: true, bubbles: true, - })); } } + document.dispatchEvent(new CustomEvent('tasks-loaded', { + detail: { + ready_count: this._ready_count, + fail_count: this._fail_count, + invalid_count: this._invalid_count, + waiting_count: this._waiting_count, + duplicate_count: this._duplicate_count, + pass_count: this._pass_count, + }, + composed: true, bubbles: true, + })); } }).catch(e => { this._isPending = false;