aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/user_profile/user_profile.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 7414e573..991062cd 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -8,8 +8,8 @@ const UserProfile = {
this.$store.commit('clearTimeline', { timeline: 'favorites' })
this.$store.commit('clearTimeline', { timeline: 'media' })
this.$store.dispatch('startFetching', ['user', this.fetchBy])
- this.$store.dispatch('startFetching', ['favorites', this.fetchBy])
this.$store.dispatch('startFetching', ['media', this.fetchBy])
+ this.startFetchFavorites()
if (!this.user.id) {
this.$store.dispatch('fetchUser', this.fetchBy)
}
@@ -74,6 +74,11 @@ const UserProfile = {
fetchFriends () {
const id = this.userId
this.$store.dispatch('addFriends', { id })
+ },
+ startFetchFavorites () {
+ if (this.isUs) {
+ this.$store.dispatch('startFetching', ['favorites', this.fetchBy])
+ }
}
},
watch: {
@@ -89,8 +94,8 @@ const UserProfile = {
this.$store.commit('clearTimeline', { timeline: 'favorites' })
this.$store.commit('clearTimeline', { timeline: 'media' })
this.$store.dispatch('startFetching', ['user', this.fetchBy])
- this.$store.dispatch('startFetching', ['favorites', this.fetchBy])
this.$store.dispatch('startFetching', ['media', this.fetchBy])
+ this.startFetchFavorites()
},
userId () {
if (!this.isExternal) {
@@ -103,8 +108,8 @@ const UserProfile = {
this.$store.commit('clearTimeline', { timeline: 'favorites' })
this.$store.commit('clearTimeline', { timeline: 'media' })
this.$store.dispatch('startFetching', ['user', this.fetchBy])
- this.$store.dispatch('startFetching', ['favorites', this.fetchBy])
this.$store.dispatch('startFetching', ['media', this.fetchBy])
+ this.startFetchFavorites()
},
user () {
if (this.user.id && !this.user.followers) {