Merge branch 'fix/follows-followers-not-displaying' into 'develop'

Fix #1034 follows/followers lists not working after update

Closes #1034

See merge request pleroma/pleroma-fe!1317
This commit is contained in:
Shpuld Shpludson 2020-12-28 18:07:47 +00:00
commit 3df84ccd5b
2 changed files with 12 additions and 6 deletions

View File

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Fixed
- Follows/Followers tabs on user profiles now display the content properly.
## [2.2.2] - 2020-12-22 ## [2.2.2] - 2020-12-22
### Added ### Added

View File

@ -29,12 +29,8 @@ const withLoadMore = ({
return { return {
loading: false, loading: false,
bottomedOut: false, bottomedOut: false,
error: false error: false,
} entries: []
},
computed: {
entries () {
return select(this.$props, this.$store) || []
} }
}, },
created () { created () {
@ -48,6 +44,11 @@ const withLoadMore = ({
destroy && destroy(this.$props, this.$store) destroy && destroy(this.$props, this.$store)
}, },
methods: { methods: {
// Entries is not a computed because computed can't track the dynamic
// selector for changes and won't trigger after fetch.
updateEntries () {
this.entries = select(this.$props, this.$store) || []
},
fetchEntries () { fetchEntries () {
if (!this.loading) { if (!this.loading) {
this.loading = true this.loading = true
@ -61,6 +62,9 @@ const withLoadMore = ({
this.loading = false this.loading = false
this.error = true this.error = true
}) })
.finally(() => {
this.updateEntries()
})
} }
}, },
scrollLoad (e) { scrollLoad (e) {