aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-12-28 18:07:47 +0000
committerShpuld Shpludson <shp@cock.li>2020-12-28 18:07:47 +0000
commit3df84ccd5b2831ebcf1fb3dda508ae353185192c (patch)
tree52770433d64f1898d3835b342948f7638fc4a976 /src
parent2312f6c15a96ba2d59f06614a165212591d88176 (diff)
parent243383852ba59d5787eaccdca157c6e809f49449 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/hocs/with_load_more/with_load_more.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js
index 7df9dbb2..671b2b6f 100644
--- a/src/hocs/with_load_more/with_load_more.js
+++ b/src/hocs/with_load_more/with_load_more.js
@@ -29,12 +29,8 @@ const withLoadMore = ({
return {
loading: false,
bottomedOut: false,
- error: false
- }
- },
- computed: {
- entries () {
- return select(this.$props, this.$store) || []
+ error: false,
+ entries: []
}
},
created () {
@@ -48,6 +44,11 @@ const withLoadMore = ({
destroy && destroy(this.$props, this.$store)
},
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 () {
if (!this.loading) {
this.loading = true
@@ -61,6 +62,9 @@ const withLoadMore = ({
this.loading = false
this.error = true
})
+ .finally(() => {
+ this.updateEntries()
+ })
}
},
scrollLoad (e) {