fix
This commit is contained in:
parent
ba21a298ff
commit
08ae09a871
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue