mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix #822 by updating the counts of the user
The load more button depends on the total of the posts available. Removing posts changes the total counts, so we have to manually update it.
This commit is contained in:
parent
4c91d8fbc5
commit
585e798dc0
@ -202,11 +202,11 @@
|
||||
|
||||
<template v-if="activePosts.length">
|
||||
<hc-post-card
|
||||
v-for="(post, index) in activePosts"
|
||||
v-for="post in activePosts"
|
||||
:key="post.id"
|
||||
:post="post"
|
||||
:width="{ base: '100%', md: '100%', xl: '50%' }"
|
||||
@removePostFromList="activePosts.splice(index, 1)"
|
||||
@removePostFromList="removePostFromList"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="$apollo.loading">
|
||||
@ -331,6 +331,10 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
removePostFromList(index) {
|
||||
this.activePosts.splice(index, 1)
|
||||
this.$apollo.queries.User.refetch()
|
||||
},
|
||||
handleTab(tab) {
|
||||
this.tabActive = tab
|
||||
this.Post = null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user