Add list timeline rendering functionality

the list name is missing; this is because the API request to get it is different
to the API request for receiving the list timeline, and is not yet implemented.
This commit is contained in:
Sol Fisher Romanoff 2022-06-15 17:12:05 +03:00
parent c1a8dc34da
commit d5d464a289
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
9 changed files with 62 additions and 11 deletions

View file

@ -0,0 +1,23 @@
import Timeline from '../timeline/timeline.vue'
const ListTimeline = {
data () {
return {
listId: null
}
},
components: {
Timeline
},
computed: {
timeline () { return this.$store.state.statuses.timelines.list }
},
created () {
this.listId = this.$route.params.id
this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
},
unmounted () {
this.$store.dispatch('stopFetchingTimeline', 'list')
}
}
export default ListTimeline

View file

@ -0,0 +1,10 @@
<template>
<Timeline
title="list.name"
:timeline="timeline"
:list-id="listId"
timeline-name="list"
/>
</template>
<script src="./list_timeline.js"></script>

View file

@ -18,6 +18,7 @@ const Timeline = {
'timelineName',
'title',
'userId',
'listId',
'tag',
'embedded',
'count',
@ -101,6 +102,7 @@ const Timeline = {
timeline: this.timelineName,
showImmediately,
userId: this.userId,
listId: this.listId,
tag: this.tag
})
},
@ -156,6 +158,7 @@ const Timeline = {
older: true,
showImmediately: true,
userId: this.userId,
listId: this.listId,
tag: this.tag
}).then(({ statuses }) => {
if (statuses && statuses.length === 0) {