From f083b97f3261c88d6dba7189b9d8b9ce91248452 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 23 Dec 2017 17:54:09 -0600 Subject: [PATCH] Don't apply updateSort if the sort hasn't changed --- manage/sort.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manage/sort.js b/manage/sort.js index 9cf0a1b7..94e93824 100644 --- a/manage/sort.js +++ b/manage/sort.js @@ -153,8 +153,8 @@ function manageSort(event) { function updateSort() { const renderBin = document.createDocumentFragment(); const entries = sortStyles({parser: 'entry'}); + const isDiffSort = [...installed.children].find((entry, index) => entry.id !== entries[index].id); let index = 0; - moveEntries(); function moveEntries() { const t0 = performance.now(); let moved = 0; @@ -169,7 +169,10 @@ function updateSort() { return; } } - installed.appendChild(renderBin); + if (isDiffSort !== undefined) { + moveEntries(); + installed.appendChild(renderBin); + } updateStripes(); }