This commit is contained in:
tamaina 2023-07-11 13:23:56 +00:00
parent 28f914f67f
commit b4d532efb4
1 changed files with 8 additions and 12 deletions

View File

@ -192,15 +192,11 @@ watch($$(rootEl), () => {
/**
* onScrollTop/onScrollBottomで細かく検出する
*/
function onHead() {
console.log('onHead');
backed = false;
executeQueue();
}
function onBacked() {
backed = true;
}
watch($$(backed), () => {
if (!backed) {
executeQueue();
}
});
watch([$$(weakBacked), $$(contentEl)], () => {
if (weakBacked || !contentEl) {
@ -217,9 +213,9 @@ watch([$$(weakBacked), $$(contentEl)], () => {
const onScroll = () => {
if (!document.body.contains(el)) return;
if (checkFn(el, tolerance)) {
onHead();
backed = false;
} else {
onBacked();
backed = true;
}
};
@ -444,7 +440,7 @@ const prepend = (item: MisskeyEntity): void => {
!isPausingUpdate && //
active.value // keepAlive
) {
if (!items.value.has(item.id)) return; //
if (items.value.has(item.id)) return; //
unshiftItems([item]);
} else {
prependQueue(item);