diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-12-03 12:43:21 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-12-03 12:43:21 +0100 |
| commit | 58ac8f51a219681e237494b8a730048f2eafbe58 (patch) | |
| tree | 4ba4b5c3ed9dc719172b0e7e4f0b80f5a3a5ab45 /src/components | |
| parent | df51d088142476c71272e175f4b486b97fd33b91 (diff) | |
Treat mentions more like a timeline.
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/mentions/mentions.js | 21 | ||||
| -rw-r--r-- | src/components/mentions/mentions.vue | 4 |
2 files changed, 11 insertions, 14 deletions
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 + }) }) } } diff --git a/src/components/mentions/mentions.vue b/src/components/mentions/mentions.vue index a760719c..6287ca11 100644 --- a/src/components/mentions/mentions.vue +++ b/src/components/mentions/mentions.vue @@ -2,9 +2,7 @@ <div class="timeline panel panel-default"> <div class="panel-heading">Mentions</div> <div class="panel-body"> - <div class="timeline"> - <status v-for="status in mentions" :key="status.id" v-bind:statusoid="status"></status> - </div> + <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'mentions'"/> </div> </div> </template> |
