This commit is contained in:
tamaina 2023-07-17 14:57:00 +00:00
parent d335da5ee4
commit 6152122d43

View file

@ -182,10 +182,10 @@ watch([() => props.pagination.reversed, $$(scrollableElement)], () => {
scrollObserver = new IntersectionObserver(entries => { scrollObserver = new IntersectionObserver(entries => {
if (!active.value) return; // active if (!active.value) return; // active
weakBacked = entries[0].intersectionRatio > 0.1; weakBacked = entries[0].intersectionRatio > 0.02;
}, { }, {
root: scrollableElement, root: scrollableElement,
rootMargin: props.pagination.reversed ? '-1000% 0px 100% 0px' : '100% 0px -1000% 0px', rootMargin: props.pagination.reversed ? '-100% 0px 100% 0px' : '100% 0px -100% 0px',
threshold: [0, 0.01, 0.02, 0.04, 0.08, 0.1, 0.12], threshold: [0, 0.01, 0.02, 0.04, 0.08, 0.1, 0.12],
}); });
}, { immediate: true }); }, { immediate: true });
@ -518,20 +518,11 @@ const prepend = (item: MisskeyEntity): void => {
if ( if (
!isPausingUpdate.value && // /調 !isPausingUpdate.value && // /調
queueSize.value === 0 && // queueSize.value === 0 && //
active.value // keepAlive active.value && // keepAlive
!backed //
) { ) {
if (!backed) {
//
if (items.value.has(item.id)) return; // if (items.value.has(item.id)) return; //
unshiftItems([item]); unshiftItems([item]);
} else if (!weakBacked) {
// 調
prependQueue(item);
executeQueue();
} else {
//
prependQueue(item);
}
} else { } else {
prependQueue(item); prependQueue(item);
} }