From 42c7f39e73c6b952e803d618aa9d3d55bd4b0d29 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 26 Feb 2018 22:54:35 +0300 Subject: [PATCH] refilter just once on a single update job fixes #353 --- manage/updater-ui.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manage/updater-ui.js b/manage/updater-ui.js index 5a77f713..e740c36d 100644 --- a/manage/updater-ui.js +++ b/manage/updater-ui.js @@ -111,6 +111,7 @@ function checkUpdate(entry, {single} = {}) { function reportUpdateState({updated, style, error, STATES}) { + const isCheckAll = document.body.classList.contains('update-in-progress'); const entry = $(ENTRY_ID_PREFIX + style.id); const newClasses = new Map([ /* @@ -155,8 +156,7 @@ function reportUpdateState({updated, style, error, STATES}) { $('.update-note', entry).textContent = message; $('.check-update', entry).title = newUI.enabled ? message : ''; $('.update', entry).title = t(edited ? 'updateCheckManualUpdateForce' : 'installUpdate'); - if (!document.body.classList.contains('update-in-progress')) { - // this is a single update job so we can decide whether to hide the filter + if (!isCheckAll) { renderUpdatesOnlyFilter({show: $('.can-update, .update-problem')}); } } @@ -177,9 +177,9 @@ function reportUpdateState({updated, style, error, STATES}) { entry.className = className; } - if (filtersSelector.hide) { - filterAndAppend({entry}); - sorter.update(); + if (filtersSelector.hide && isCheckAll) { + filterAndAppend({entry}).then(() => + sorter.update()); } }