Treat mentions more like a timeline.
This commit is contained in:
parent
df51d08814
commit
58ac8f51a2
4 changed files with 53 additions and 17 deletions
|
@ -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
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue