Merge branch 'pag-back' into noman

This commit is contained in:
tamaina 2023-07-30 13:56:56 +00:00
commit 965935278e
1 changed files with 8 additions and 6 deletions

View File

@ -568,6 +568,7 @@ async function executeQueue() {
unshiftItems(newItems); unshiftItems(newItems);
queue.value = new Map(); queue.value = new Map();
} else { } else {
if (queue.value.size > 0) {
const queueArr = Array.from(queue.value.entries()); const queueArr = Array.from(queue.value.entries());
queue.value = new Map(queueArr.slice(props.pagination.limit)); queue.value = new Map(queueArr.slice(props.pagination.limit));
const newItems = Array.from({ length: Math.min(queueArr.length, props.pagination.limit) }, (_, i) => queueArr[i][1]).reverse(); const newItems = Array.from({ length: Math.min(queueArr.length, props.pagination.limit) }, (_, i) => queueArr[i][1]).reverse();
@ -575,6 +576,7 @@ async function executeQueue() {
await adjustScroll(() => unshiftItems(newItems, Infinity)); await adjustScroll(() => unshiftItems(newItems, Infinity));
backed = true; backed = true;
}
denyMoveTransition.value = true; denyMoveTransition.value = true;
items.value = new Map([...items.value].slice(0, displayLimit.value)); items.value = new Map([...items.value].slice(0, displayLimit.value));