diff options
| author | Sean King <seanking2919@protonmail.com> | 2022-08-22 19:08:58 -0600 |
|---|---|---|
| committer | Sean King <seanking2919@protonmail.com> | 2022-08-22 19:08:58 -0600 |
| commit | ee58e3868c2d58b889d8a32c1b6dfd3732df7584 (patch) | |
| tree | da8f8783734740df18cb5c1082d4756bfcf47489 /src/components/lists_timeline/lists_timeline.js | |
| parent | 325930eecb4943bb50344159646a7c62b4bf10b3 (diff) | |
| parent | cb6b96b9ba4e71310e823aecc4bb8c22d370397a (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into add/edit-status
Diffstat (limited to 'src/components/lists_timeline/lists_timeline.js')
| -rw-r--r-- | src/components/lists_timeline/lists_timeline.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/lists_timeline/lists_timeline.js b/src/components/lists_timeline/lists_timeline.js new file mode 100644 index 00000000..7534420d --- /dev/null +++ b/src/components/lists_timeline/lists_timeline.js @@ -0,0 +1,36 @@ +import Timeline from '../timeline/timeline.vue' +const ListsTimeline = { + data () { + return { + listId: null + } + }, + components: { + Timeline + }, + computed: { + timeline () { return this.$store.state.statuses.timelines.list } + }, + watch: { + $route: function (route) { + if (route.name === 'lists-timeline' && route.params.id !== this.listId) { + this.listId = route.params.id + this.$store.dispatch('stopFetchingTimeline', 'list') + this.$store.commit('clearTimeline', { timeline: 'list' }) + this.$store.dispatch('fetchList', { id: this.listId }) + this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId }) + } + } + }, + created () { + this.listId = this.$route.params.id + this.$store.dispatch('fetchList', { id: this.listId }) + this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId }) + }, + unmounted () { + this.$store.dispatch('stopFetchingTimeline', 'list') + this.$store.commit('clearTimeline', { timeline: 'list' }) + } +} + +export default ListsTimeline |
