Update MkTimeline.vue

This commit is contained in:
syuilo 2025-04-29 12:23:46 +09:00
parent f9050e9282
commit a2230ab658
1 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, watch, onUnmounted, provide, useTemplateRef, TransitionGroup, onMounted, shallowRef, ref } from 'vue'; import { computed, watch, onUnmounted, provide, useTemplateRef, TransitionGroup, onMounted, shallowRef, ref } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import { useInterval } from '@@/js/use-interval.js'; import { useInterval } from '@@/js/use-interval.js';
import { scrollToTop } from '@@/js/scroll.js'; import { isHeadVisible, scrollToTop } from '@@/js/scroll.js';
import type { BasicTimelineType } from '@/timelines.js'; import type { BasicTimelineType } from '@/timelines.js';
import type { PagingCtx } from '@/use/use-pagination.js'; import type { PagingCtx } from '@/use/use-pagination.js';
import { usePagination } from '@/use/use-pagination.js'; import { usePagination } from '@/use/use-pagination.js';
@ -122,7 +122,7 @@ if (!store.s.realtimeMode) {
}); });
console.log(notes); console.log(notes);
const isTop = false; const isTop = isHeadVisible(rootEl.value, 16);
if (isTop) { if (isTop) {
paginator.unshiftItems(notes.toReversed()); paginator.unshiftItems(notes.toReversed());
} else { } else {
@ -150,7 +150,7 @@ function prepend(note: Misskey.entities.Note) {
note._shouldInsertAd_ = true; note._shouldInsertAd_ = true;
} }
const isTop = false; const isTop = isHeadVisible(rootEl.value, 16);
if (isTop) { if (isTop) {
paginator.prepend(note); paginator.prepend(note);
} else { } else {