diff options
| author | Shpuld Shpludson <shp@cock.li> | 2017-11-14 16:34:32 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2017-11-14 16:34:32 +0000 |
| commit | dff1153d1c8394aea766e1b5fd81e87a7f3b16e7 (patch) | |
| tree | e5baa0eb0f944fa79f9332ccf3fcc23f03531355 /src/components/user_profile/user_profile.js | |
| parent | 429ec1ceab520e348dd1e4dcc5fc6bf6835bc259 (diff) | |
| parent | 07057043d96cef9d3a0087f46fa4ff14a1f6788f (diff) | |
Merge branch 'fix/user-view-without-posts' into 'develop'
Use state object for user view instead of timeline.
See merge request pleroma/pleroma-fe!161
Diffstat (limited to 'src/components/user_profile/user_profile.js')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 48a8a073..26be1801 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -5,6 +5,9 @@ const UserProfile = { created () { this.$store.commit('clearTimeline', { timeline: 'user' }) this.$store.dispatch('startFetching', ['user', this.userId]) + if (!this.$store.state.users.usersObject[this.userId]) { + this.$store.dispatch('fetchUser', this.userId) + } }, destroyed () { this.$store.dispatch('stopFetching', 'user') @@ -18,7 +21,7 @@ const UserProfile = { if (this.timeline.statuses[0]) { return this.timeline.statuses[0].user } else { - return false + return this.$store.state.users.usersObject[this.userId] || false } } }, |
