diff options
Diffstat (limited to 'src/components/user_profile')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 5 | ||||
| -rw-r--r-- | src/components/user_profile/user_profile.vue | 29 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 4eddb8b1..71a88dcf 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -40,6 +40,9 @@ const UserProfile = { timeline () { return this.$store.state.statuses.timelines.user }, + pinned () { + return this.$store.state.statuses.timelines.pinned + }, favorites () { return this.$store.state.statuses.timelines.favorites }, @@ -91,6 +94,7 @@ const UserProfile = { fetchTimelines () { const userId = this.userId this.$store.dispatch('startFetchingTimeline', { timeline: 'user', userId }) + this.$store.dispatch('startFetchingTimeline', { timeline: 'pinned', userId }) this.$store.dispatch('startFetchingTimeline', { timeline: 'media', userId }) if (this.isUs) { this.$store.dispatch('startFetchingTimeline', { timeline: 'favorites', userId }) @@ -98,6 +102,7 @@ const UserProfile = { }, cleanUp () { this.$store.dispatch('stopFetching', 'user') + this.$store.dispatch('stopFetching', 'pinned') this.$store.dispatch('stopFetching', 'favorites') this.$store.dispatch('stopFetching', 'media') this.$store.commit('clearTimeline', { timeline: 'user' }) diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 71c625b7..caf297c6 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -3,16 +3,25 @@ <div v-if="user" class="user-profile panel panel-default"> <UserCard :user="user" :switcher="true" :selected="timeline.viewing" rounded="top"/> <tab-switcher :renderOnlyFocused="true" ref="tabSwitcher"> - <Timeline - :label="$t('user_card.statuses')" - :disabled="!user.statuses_count" - :count="user.statuses_count" - :embedded="true" - :title="$t('user_profile.timeline_title')" - :timeline="timeline" - :timeline-name="'user'" - :user-id="userId" - /> + <div :label="$t('user_card.statuses')" :disabled="!user.statuses_count"> + <Timeline + :count="user.statuses_count" + :embedded="true" + :title="$t('user_profile.timeline_title')" + :timeline="pinned" + :timeline-name="'pinned'" + :user-id="userId" + :no-load-more="true" + /> + <Timeline + :count="user.statuses_count" + :embedded="true" + :title="$t('user_profile.timeline_title')" + :timeline="timeline" + :timeline-name="'user'" + :user-id="userId" + /> + </div> <div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count"> <FriendList :userId="userId"> <template slot="item" slot-scope="{item}"> |
