diff --git a/packages/client/src/components/MkPagination.vue b/packages/client/src/components/MkPagination.vue index c262ee931c..d98fc7252e 100644 --- a/packages/client/src/components/MkPagination.vue +++ b/packages/client/src/components/MkPagination.vue @@ -90,6 +90,7 @@ const backed = ref(false); // 遡り中か否か const isBackTop = ref(false); const empty = computed(() => items.value.length === 0); const error = ref(false); +const alreadyInitedOnce = ref(false); const init = async (): Promise => { queue.value = []; @@ -344,10 +345,14 @@ init(); onActivated(() => { isBackTop.value = false; + if(alreadyInitedOnce.value) { + reload(); + } }); onDeactivated(() => { isBackTop.value = window.scrollY === 0; + alreadyInitedOnce.value = true; }); defineExpose({ diff --git a/packages/client/src/pages/messaging/index.vue b/packages/client/src/pages/messaging/index.vue index 8faca318e1..3866db1c77 100644 --- a/packages/client/src/pages/messaging/index.vue +++ b/packages/client/src/pages/messaging/index.vue @@ -13,8 +13,8 @@ {{ i18n.ts.startMessaging }} - - + @@ -28,8 +28,8 @@ i18n.ts.startMessaging }} - - + @@ -62,8 +62,9 @@ import 'swiper/scss/virtual'; const router = useRouter(); let messages = $ref([]); -let groupMessages = $ref([]); let connection = $ref(null); +let paginationComponentUser = $ref>(); +let paginationComponentGroup = $ref>(); const tabs = ['dms', 'groups']; let tab = $ref(tabs[0]); @@ -116,9 +117,10 @@ function onMessage(message): void { messages.unshift(message); } else if (message.groupId) { - groupMessages = groupMessages.filter(m => m.groupId !== message.groupId); - groupMessages.unshift(message); + messages = messages.filter(m => m.groupId !== message.groupId); + messages.unshift(message); } + forceRerender(); } function onRead(ids): void {