diff --git a/packages/client/src/components/ui/pagination.vue b/packages/client/src/components/ui/pagination.vue index 489ffad10..6b945c78e 100644 --- a/packages/client/src/components/ui/pagination.vue +++ b/packages/client/src/components/ui/pagination.vue @@ -35,7 +35,7 @@ import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue'; import * as misskey from 'misskey-js'; import * as os from '@/os'; -import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottom } from '@/scripts/scroll'; +import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll'; import MkButton from '@/components/ui/button.vue'; import { defaultStore } from '@/store'; import { MisskeyEntity } from '@/types/date-separated-list'; @@ -303,7 +303,7 @@ const prepend = (item: MisskeyEntity, force = false): void => { return; } - const isTop = isBackTop.value || (props.pagination.reversed ? isBottom : isTopVisible)(contentEl); + const isTop = isBackTop.value || (props.pagination.reversed ? isBottomVisible : isTopVisible)(contentEl); if (isTop || force) { // Prepend the item diff --git a/packages/client/src/pages/messaging/messaging-room.vue b/packages/client/src/pages/messaging/messaging-room.vue index 88ea4d475..78f6daaa5 100644 --- a/packages/client/src/pages/messaging/messaging-room.vue +++ b/packages/client/src/pages/messaging/messaging-room.vue @@ -57,7 +57,7 @@ import XList from '@/components/date-separated-list.vue'; import MkPagination, { Paging } from '@/components/ui/pagination.vue'; import XMessage from './messaging-room.message.vue'; import XForm from './messaging-room.form.vue'; -import { isBottom, onScrollBottom, scrollToBottom } from '@/scripts/scroll'; +import { isBottomVisible, onScrollBottom, scrollToBottom } from '@/scripts/scroll'; import * as os from '@/os'; import { stream } from '@/stream'; import * as sound from '@/scripts/sound'; @@ -190,7 +190,7 @@ function onDrop(e: DragEvent): void { function onMessage(message) { sound.play('chat'); - const _isBottom = isBottom(rootEl, 64); + const _isBottom = isBottomVisible(rootEl, 64); pagingComponent.prepend(message); if (message.userId != $i?.id && !document.hidden) {