From 58ac8f51a219681e237494b8a730048f2eafbe58 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 3 Dec 2016 12:43:21 +0100 Subject: Treat mentions more like a timeline. --- src/components/mentions/mentions.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/components/mentions/mentions.js') diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js index e84d1912..46a1c63e 100644 --- a/src/components/mentions/mentions.js +++ b/src/components/mentions/mentions.js @@ -1,26 +1,25 @@ -import Status from '../status/status.vue' -// Temporary -import { prepareStatus } from '../../modules/statuses.js' -import { map } from 'lodash' +import Timeline from '../timeline/timeline.vue' const Mentions = { - data () { - return { - mentions: [] - } - }, computed: { username () { return this.$route.params.username + }, + timeline () { + return this.$store.state.statuses.timelines.mentions } }, components: { - Status + Timeline }, created () { this.$store.state.api.backendInteractor.fetchMentions({username: this.username}) .then((mentions) => { - this.mentions = map(mentions, prepareStatus) + this.$store.dispatch('addNewStatuses', { + statuses: mentions, + timeline: 'mentions', + showImmediately: true + }) }) } } -- cgit v1.2.3-70-g09d2