handleUpdate may alter/add an entry which needs to be sorted

This commit is contained in:
tophf 2018-05-15 14:56:12 +03:00
parent 68165e8fa2
commit 1d0ca613f9
2 changed files with 2 additions and 2 deletions

View File

@ -544,7 +544,7 @@ function handleUpdate(style, {reason, method, codeIsUpdated} = {}) {
if ((reason === 'update' || reason === 'install') && entry.matches('.updatable')) { if ((reason === 'update' || reason === 'install') && entry.matches('.updatable')) {
handleUpdateInstalled(entry, reason); handleUpdateInstalled(entry, reason);
} }
filterAndAppend({entry}).then(sorter.updateStripes); filterAndAppend({entry}).then(sorter.update);
if (!entry.matches('.hidden') && reason !== 'import') { if (!entry.matches('.hidden') && reason !== 'import') {
animateElement(entry); animateElement(entry);
requestAnimationFrame(() => scrollElementIntoView(entry)); requestAnimationFrame(() => scrollElementIntoView(entry));

View File

@ -136,8 +136,8 @@ const sorter = (() => {
const renderBin = document.createDocumentFragment(); const renderBin = document.createDocumentFragment();
sorted.forEach(({entry}) => renderBin.appendChild(entry)); sorted.forEach(({entry}) => renderBin.appendChild(entry));
installed.appendChild(renderBin); installed.appendChild(renderBin);
updateStripes();
} }
updateStripes();
} }
function updateStripes() { function updateStripes() {