mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fixed follow stats
This commit is contained in:
parent
29dac5c5a3
commit
78c9b83282
@ -79,8 +79,8 @@ export default {
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
this.$emit('update', follow ? res.data.follow : follow)
|
||||
this.$emit('optimistic', follow ? res.data.follow : follow)
|
||||
// this.$emit('optimistic', follow ? res.data.follow : follow)
|
||||
this.$emit('update', follow)
|
||||
})
|
||||
.catch(() => {
|
||||
this.$emit('optimistic', !follow)
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
<ds-flex>
|
||||
<ds-flex-item>
|
||||
<no-ssr>
|
||||
<ds-number :label="$t('profile.following')">
|
||||
<ds-number :label="$t('profile.followers')">
|
||||
<hc-count-to
|
||||
slot="count"
|
||||
:end-val="followedByCount"
|
||||
@ -71,7 +71,7 @@
|
||||
</ds-flex-item>
|
||||
<ds-flex-item>
|
||||
<no-ssr>
|
||||
<ds-number :label="$t('profile.followers')">
|
||||
<ds-number :label="$t('profile.following')">
|
||||
<hc-count-to
|
||||
slot="count"
|
||||
:end-val="Number(user.followingCount) || 0"
|
||||
@ -88,7 +88,7 @@
|
||||
:follow-id="user.id"
|
||||
:is-followed="user.followedByCurrentUser"
|
||||
@optimistic="follow => user.followedByCurrentUser = follow"
|
||||
@update="follow => user.followedByCurrentUser = follow && fetchUser()"
|
||||
@update="follow => fetchUser()"
|
||||
/>
|
||||
</ds-space>
|
||||
<template v-if="user.about">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user