summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrille Bollu <cyrpub@bollu.be>2019-10-25 13:49:45 +0200
committerRobin Appelman <robin@icewind.nl>2020-10-13 23:54:16 +0200
commita75cb8ca859ec37705be3b036359fd46cd64bb5b (patch)
tree2e7ef9739ca59f3d32b6b1111a3f518a3dbafa94
parent1e378654dc2c23ade910d259bac9293a9c58ac62 (diff)
FIX: updated Profile.vue to use computed properties rather than methods for the account mixins
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
-rw-r--r--src/views/Profile.vue10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/views/Profile.vue b/src/views/Profile.vue
index 8b549ae9..cbabbf93 100644
--- a/src/views/Profile.vue
+++ b/src/views/Profile.vue
@@ -21,11 +21,11 @@
-->
<template>
- <div :class="{'icon-loading': !accountLoaded(uid)}" class="social__wrapper">
- <profile-info v-if="accountLoaded(uid) && accountInfo(uid)" :uid="uid" />
+ <div :class="{'icon-loading': !accountLoaded}" class="social__wrapper">
+ <profile-info v-if="accountLoaded && accountInfo" :uid="uid" />
<!-- TODO: we have no details, timeline and follower list for non-local accounts for now -->
- <router-view v-if="accountLoaded(uid) && accountInfo(uid) && accountInfo(uid).local" name="details" />
- <empty-content v-if="accountLoaded(uid) && !accountInfo(uid)" :item="emptyContentData" />
+ <router-view v-if="accountLoaded && accountInfo && accountInfo.local" name="details" />
+ <empty-content v-if="accountLoaded && !accountInfo" :item="emptyContentData" />
</div>
</template>
@@ -85,7 +85,7 @@ export default {
// We need to update this.uid because we may have asked info for an account whose domain part was a host-meta,
// and the account returned by the backend always uses a non host-meta'ed domain for its ID
- this.$store.dispatch(fetchMethod, this.profileAccount(this.uid)).then((response) => {
+ this.$store.dispatch(fetchMethod, this.profileAccount).then((response) => {
this.uid = response.account
})
}