reloading chat to hotfix caching issue
This commit is contained in:
parent
641feb04e3
commit
269bc3fdff
@ -13,7 +13,7 @@
|
|||||||
<MkButton primary class="start" @click="startUser"><i class="ph-plus-bold ph-lg"></i> {{
|
<MkButton primary class="start" @click="startUser"><i class="ph-plus-bold ph-lg"></i> {{
|
||||||
i18n.ts.startMessaging
|
i18n.ts.startMessaging
|
||||||
}}</MkButton>
|
}}</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"
|
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block"
|
||||||
:message="message" />
|
:message="message" />
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
i18n.ts.startMessaging
|
i18n.ts.startMessaging
|
||||||
}}</MkButton>
|
}}</MkButton>
|
||||||
</div>
|
</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"
|
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block"
|
||||||
:message="message" />
|
:message="message" />
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { markRaw, onMounted, onUnmounted, watch, computed } from 'vue';
|
import { markRaw, onMounted, onUnmounted, watch, computed, onActivated } from 'vue';
|
||||||
import * as Acct from 'calckey-js/built/acct';
|
import * as Acct from 'calckey-js/built/acct';
|
||||||
import { Virtual } from 'swiper';
|
import { Virtual } from 'swiper';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||||
@ -65,6 +65,9 @@ let messages = $ref([]);
|
|||||||
let groupMessages = $ref([]);
|
let groupMessages = $ref([]);
|
||||||
let connection = $ref(null);
|
let connection = $ref(null);
|
||||||
|
|
||||||
|
let paginationComponentUser = $ref<InstanceType<typeof MkPagination>>();
|
||||||
|
let paginationComponentGroup = $ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
const tabs = ['dms', 'groups'];
|
const tabs = ['dms', 'groups'];
|
||||||
let tab = $ref(tabs[0]);
|
let tab = $ref(tabs[0]);
|
||||||
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
|
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
|
||||||
@ -210,6 +213,11 @@ onMounted(() => {
|
|||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (connection) connection.dispose();
|
if (connection) connection.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onActivated(() => {
|
||||||
|
paginationComponentUser.reload();
|
||||||
|
paginationComponentGroup.reload();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user