mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
Revert "wip"
This reverts commit 5a2990a2fa7418f3d6797de6aaaaed5f976ffa63.
This commit is contained in:
parent
e51be7bcf6
commit
81fa1909e9
@ -90,7 +90,6 @@ 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<void> => {
|
||||
queue.value = [];
|
||||
@ -345,14 +344,10 @@ init();
|
||||
|
||||
onActivated(() => {
|
||||
isBackTop.value = false;
|
||||
if(alreadyInitedOnce.value) {
|
||||
reload();
|
||||
}
|
||||
});
|
||||
|
||||
onDeactivated(() => {
|
||||
isBackTop.value = window.scrollY === 0;
|
||||
alreadyInitedOnce.value = true;
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
|
@ -13,7 +13,7 @@
|
||||
<MkButton primary class="start" @click="startUser"><i class="ph-plus-bold ph-lg"></i> {{
|
||||
i18n.ts.startMessaging
|
||||
}}</MkButton>
|
||||
<MkPagination v-slot="{ items }" :pagination="dmsPagination">
|
||||
<MkPagination v-slot="{ items }" ref="paginationComponentUser" :pagination="dmsPagination">
|
||||
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block"
|
||||
:message="message" />
|
||||
</MkPagination>
|
||||
@ -28,7 +28,7 @@
|
||||
i18n.ts.startMessaging
|
||||
}}</MkButton>
|
||||
</div>
|
||||
<MkPagination v-slot="{ items }" :pagination="groupsPagination">
|
||||
<MkPagination v-slot="{ items }" ref="paginationComponentGroup" :pagination="groupsPagination">
|
||||
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block"
|
||||
:message="message" />
|
||||
</MkPagination>
|
||||
@ -41,7 +41,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { markRaw, onMounted, onUnmounted, watch, computed } from 'vue';
|
||||
import { markRaw, onMounted, onUnmounted, watch, computed, onActivated, onDeactivated } from 'vue';
|
||||
import * as Acct from 'calckey-js/built/acct';
|
||||
import { Virtual } from 'swiper';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
@ -212,6 +212,20 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
if (connection) connection.dispose();
|
||||
});
|
||||
|
||||
// temporary hot fix of the temporary hot fix
|
||||
let alreadyInit = $ref(false);
|
||||
|
||||
onActivated(() => {
|
||||
if (alreadyInit.value) {
|
||||
paginationComponentUser.reload();
|
||||
paginationComponentGroup.reload();
|
||||
}
|
||||
});
|
||||
|
||||
onDeactivated(() => {
|
||||
alreadyInit.value = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Loading…
Reference in New Issue
Block a user