diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-01-26 21:11:02 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-01-26 21:11:02 +0000 |
| commit | b82ba54addf0cd66419db478a93d1ee8350eeedd (patch) | |
| tree | 0c87190439d8fa6cadcc71623769e5c1cca79b80 /src/components/user_profile/user_profile.js | |
| parent | 8197c77f75929aad557c98a5f698159b1a6d0c90 (diff) | |
| parent | efad3ad0a51273e192590761b905d4db7d76bf71 (diff) | |
Merge branch 'feature/media-timeline' into 'develop'
media timeline
See merge request pleroma/pleroma-fe!472
Diffstat (limited to 'src/components/user_profile/user_profile.js')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index c9197a1c..7414e573 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -6,8 +6,10 @@ const UserProfile = { created () { this.$store.commit('clearTimeline', { timeline: 'user' }) 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]) if (!this.user.id) { this.$store.dispatch('fetchUser', this.fetchBy) } @@ -15,6 +17,7 @@ const UserProfile = { destroyed () { this.$store.dispatch('stopFetching', 'user') this.$store.dispatch('stopFetching', 'favorites') + this.$store.dispatch('stopFetching', 'media') }, computed: { timeline () { @@ -23,6 +26,9 @@ const UserProfile = { favorites () { return this.$store.state.statuses.timelines.favorites }, + media () { + return this.$store.state.statuses.timelines.media + }, userId () { return this.$route.params.id || this.user.id }, @@ -78,10 +84,13 @@ const UserProfile = { } this.$store.dispatch('stopFetching', 'user') this.$store.dispatch('stopFetching', 'favorites') + this.$store.dispatch('stopFetching', 'media') this.$store.commit('clearTimeline', { timeline: 'user' }) 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]) }, userId () { if (!this.isExternal) { @@ -89,10 +98,13 @@ const UserProfile = { } this.$store.dispatch('stopFetching', 'user') this.$store.dispatch('stopFetching', 'favorites') + this.$store.dispatch('stopFetching', 'media') this.$store.commit('clearTimeline', { timeline: 'user' }) 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]) }, user () { if (this.user.id && !this.user.followers) { |
