logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

lists_timeline.js (1107B)


  1. import Timeline from '../timeline/timeline.vue'
  2. const ListsTimeline = {
  3. data () {
  4. return {
  5. listId: null
  6. }
  7. },
  8. components: {
  9. Timeline
  10. },
  11. computed: {
  12. timeline () { return this.$store.state.statuses.timelines.list }
  13. },
  14. watch: {
  15. $route: function (route) {
  16. if (route.name === 'lists-timeline' && route.params.id !== this.listId) {
  17. this.listId = route.params.id
  18. this.$store.dispatch('stopFetchingTimeline', 'list')
  19. this.$store.commit('clearTimeline', { timeline: 'list' })
  20. this.$store.dispatch('fetchList', { listId: this.listId })
  21. this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
  22. }
  23. }
  24. },
  25. created () {
  26. this.listId = this.$route.params.id
  27. this.$store.dispatch('fetchList', { listId: this.listId })
  28. this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
  29. },
  30. unmounted () {
  31. this.$store.dispatch('stopFetchingTimeline', 'list')
  32. this.$store.commit('clearTimeline', { timeline: 'list' })
  33. }
  34. }
  35. export default ListsTimeline