fix: gallery without sort
This commit is contained in:
parent
e20b4bff38
commit
a60fe311d6
1 changed files with 4 additions and 5 deletions
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
if (resort && changed) sortAttributes();
|
||||
if (resort && changed) sortEntities();
|
||||
}
|
||||
|
||||
// Labelling
|
||||
|
@ -53,7 +53,7 @@
|
|||
labelListing = query(`(matches (in ${addressesString}) "LBL" ? )`).result;
|
||||
}
|
||||
|
||||
function sortAttributes() {
|
||||
function sortEntities() {
|
||||
if (!sort) return;
|
||||
|
||||
sortedEntities = deduplicatedEntities.concat();
|
||||
|
@ -80,14 +80,13 @@
|
|||
deduplicatedEntities.forEach((address) => {
|
||||
addSortKeys(address, $labelListing.getObject(address).identify());
|
||||
});
|
||||
sortAttributes();
|
||||
sortEntities();
|
||||
resort = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sort) {
|
||||
// Since `sortAttributes` also fills `sortedEntities`, we need to run at least once even if we aren't sorting.
|
||||
sortAttributes();
|
||||
sortedEntities = entities;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue