From bfd530aaea75ab228d3ccc531de790cef2ddf332 Mon Sep 17 00:00:00 2001 From: wakarimasen Date: Thu, 9 Mar 2017 18:20:16 +0100 Subject: [PATCH] Let timeline component fetch mentions --- src/components/mentions/mentions.js | 13 ------------- src/services/api/api.service.js | 1 + 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js index 46a1c63ecb..841d5aa481 100644 --- a/src/components/mentions/mentions.js +++ b/src/components/mentions/mentions.js @@ -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 - }) - }) } } diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index f172f76982..86ae7f705d 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -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 }