Fixed follow stats

This commit is contained in:
Grzegorz Leoniec 2019-03-06 13:08:26 +01:00
parent 29dac5c5a3
commit 78c9b83282
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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">