aboutsummaryrefslogtreecommitdiff
path: root/src/components/bookmark_timeline/bookmark_timeline.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2024-10-04 10:11:49 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2024-10-04 10:11:49 +0000
commitbb0a7a81c5c5e9947471ccffff629af9ee6d6185 (patch)
treee67dca18d5f0343ae798e60bfec7d7969e54856f /src/components/bookmark_timeline/bookmark_timeline.js
parenta1c3a7a742ea86b0ddeb67a42ca27f478f0f22a2 (diff)
parent216ca52073212942ffb6f75b63993a5f5c32a5d6 (diff)
Merge branch 'bookmark-folders' into 'develop'
Bookmark folders Closes #1335 See merge request pleroma/pleroma-fe!1945
Diffstat (limited to 'src/components/bookmark_timeline/bookmark_timeline.js')
-rw-r--r--src/components/bookmark_timeline/bookmark_timeline.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/components/bookmark_timeline/bookmark_timeline.js b/src/components/bookmark_timeline/bookmark_timeline.js
index 5ac43d90..9571d630 100644
--- a/src/components/bookmark_timeline/bookmark_timeline.js
+++ b/src/components/bookmark_timeline/bookmark_timeline.js
@@ -1,16 +1,31 @@
import Timeline from '../timeline/timeline.vue'
const Bookmarks = {
+ created () {
+ this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
+ },
+ components: {
+ Timeline
+ },
computed: {
+ folderId () {
+ return this.$route.params.id
+ },
timeline () {
return this.$store.state.statuses.timelines.bookmarks
}
},
- components: {
- Timeline
+ watch: {
+ folderId () {
+ this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
+ this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
+ }
},
unmounted () {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
}
}