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
This commit is contained in:
commit
bb2ee04f04
1 changed files with 8 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue