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 ( if (
!isPausingUpdateByExecutingQueue.value && // 調 !isPausingUpdateByExecutingQueue.value && // 調
visibility.value !== 'hidden' && //
queueSize.value === 0 && // queueSize.value === 0 && //
active.value // keepAlive active.value // keepAlive
) { ) {
if (!backed) { if (!backed) {
// //
if (items.value.has(item.id)) return; // if (items.value.has(item.id)) return; //
if (visibility.value === 'hidden') { unshiftItems([item]);
//
// prependQueue
// (SafariunshiftItems)
prependQueue(item);
//
scrollBy(scrollableElement, { top: 24, behavior: 'instant' });
// backedtrue
backed = true;
} else {
unshiftItems([item]);
}
} else if (!weakBacked) { } else if (!weakBacked) {
// 調 // 調
prependQueue(item); prependQueue(item);
@ -503,6 +493,15 @@ async function executeQueue() {
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));
isPausingUpdateByExecutingQueue.value = true; isPausingUpdateByExecutingQueue.value = true;
if (!backed) {
//
// ChromeFirefox調
scrollBy(scrollableElement, { top: 24, behavior: 'instant' });
// backedtrue
backed = true;
await nextTick();
}
unshiftItems( unshiftItems(
queueArr.slice(0, props.pagination.limit).map(v => v[1]).reverse(), queueArr.slice(0, props.pagination.limit).map(v => v[1]).reverse(),
Infinity, Infinity,