2020-07-03 19:45:49 +00:00
|
|
|
import Timeline from '../timeline/timeline.vue'
|
|
|
|
|
|
|
|
|
|
const Bookmarks = {
|
2024-09-23 23:10:32 +02:00
|
|
|
created () {
|
|
|
|
|
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
|
|
|
|
|
this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
Timeline
|
|
|
|
|
},
|
2020-07-03 19:45:49 +00:00
|
|
|
computed: {
|
2024-09-23 23:10:32 +02:00
|
|
|
folderId () {
|
|
|
|
|
return this.$route.params.id
|
|
|
|
|
},
|
2020-07-03 19:45:49 +00:00
|
|
|
timeline () {
|
|
|
|
|
return this.$store.state.statuses.timelines.bookmarks
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-09-23 23:10:32 +02:00
|
|
|
watch: {
|
|
|
|
|
folderId () {
|
|
|
|
|
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
|
|
|
|
|
this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
|
|
|
|
|
this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
|
|
|
|
|
}
|
2020-07-03 19:45:49 +00:00
|
|
|
},
|
2021-04-25 13:44:50 +03:00
|
|
|
unmounted () {
|
2020-07-03 19:45:49 +00:00
|
|
|
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
|
2024-09-23 23:10:32 +02:00
|
|
|
this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
|
2020-07-03 19:45:49 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Bookmarks
|