Let timeline component fetch mentions

This commit is contained in:
wakarimasen 2017-03-09 18:20:16 +01:00
parent 7aa1f02e38
commit bfd530aaea
2 changed files with 1 additions and 13 deletions

View file

@ -2,25 +2,12 @@ import Timeline from '../timeline/timeline.vue'
const Mentions = {
computed: {
username () {
return this.$route.params.username
},
timeline () {
return this.$store.state.statuses.timelines.mentions
}
},
components: {
Timeline
},
created () {
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
.then((mentions) => {
this.$store.dispatch('addNewStatuses', {
statuses: mentions,
timeline: 'mentions',
showImmediately: true
})
})
}
}

View file

@ -100,6 +100,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false}) =>
const timelineUrls = {
public: PUBLIC_TIMELINE_URL,
friends: FRIENDS_TIMELINE_URL,
mentions: MENTIONS_URL,
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL
}