diff options
| author | lambda <pleromagit@rogerbraun.net> | 2019-01-28 16:22:03 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2019-01-28 16:22:03 +0000 |
| commit | bb2ee04f04dac177407f7cfbc8709ed4cd9965ff (patch) | |
| tree | 1188f318e9e30069ce515d850cd537edde6ad625 | |
| parent | 53712c1570fa1f603356161164a695dfeb5b53fa (diff) | |
| parent | 82ef57cd59749febd83ffc0aacd0057c409cef73 (diff) | |
Merge branch 'fix/dont-fetch-favorites-for-others' into 'develop'
fix/don't fetch favs if the profile isnt current user
See merge request pleroma/pleroma-fe!484
| -rw-r--r-- | src/components/user_profile/user_profile.js | 11 |
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) { |
