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 = { const Mentions = {
computed: { computed: {
username () {
return this.$route.params.username
},
timeline () { timeline () {
return this.$store.state.statuses.timelines.mentions return this.$store.state.statuses.timelines.mentions
} }
}, },
components: { components: {
Timeline 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 = { const timelineUrls = {
public: PUBLIC_TIMELINE_URL, public: PUBLIC_TIMELINE_URL,
friends: FRIENDS_TIMELINE_URL, friends: FRIENDS_TIMELINE_URL,
mentions: MENTIONS_URL,
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL 'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL
} }