logo

pleroma-fe

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

lists_timeline.js (1140B)


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