logo

pleroma-fe

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

bookmark_timeline.js (942B)


  1. import Timeline from '../timeline/timeline.vue'
  2. const Bookmarks = {
  3. created () {
  4. this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
  5. this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
  6. },
  7. components: {
  8. Timeline
  9. },
  10. computed: {
  11. folderId () {
  12. return this.$route.params.id
  13. },
  14. timeline () {
  15. return this.$store.state.statuses.timelines.bookmarks
  16. }
  17. },
  18. watch: {
  19. folderId () {
  20. this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
  21. this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
  22. this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
  23. }
  24. },
  25. unmounted () {
  26. this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
  27. this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
  28. }
  29. }
  30. export default Bookmarks