This commit is contained in:
tamaina 2023-07-18 13:02:20 +00:00
parent f7d776e4da
commit 94f9ebc80c

View file

@ -443,24 +443,14 @@ const prepend = (item: MisskeyEntity): void => {
if (
!isPausingUpdateByExecutingQueue.value && // 調
visibility.value !== 'hidden' && //
queueSize.value === 0 && //
active.value // keepAlive
) {
if (!backed) {
//
if (items.value.has(item.id)) return; //
if (visibility.value === 'hidden') {
//
// prependQueue
// (SafariunshiftItems)
prependQueue(item);
//
scrollBy(scrollableElement, { top: 24, behavior: 'instant' });
// backedtrue
backed = true;
} else {
unshiftItems([item]);
}
unshiftItems([item]);
} else if (!weakBacked) {
// 調
prependQueue(item);
@ -503,6 +493,15 @@ async function executeQueue() {
const queueArr = Array.from(queue.value.entries());
queue.value = new Map(queueArr.slice(props.pagination.limit));
isPausingUpdateByExecutingQueue.value = true;
if (!backed) {
//
// ChromeFirefox調
scrollBy(scrollableElement, { top: 24, behavior: 'instant' });
// backedtrue
backed = true;
await nextTick();
}
unshiftItems(
queueArr.slice(0, props.pagination.limit).map(v => v[1]).reverse(),
Infinity,