diff options
| author | marcin mikołajczak <git@mkljczk.pl> | 2024-09-23 23:10:32 +0200 |
|---|---|---|
| committer | marcin mikołajczak <git@mkljczk.pl> | 2024-09-23 23:13:40 +0200 |
| commit | 9e45228823cd0fa7eb9388b0eb7780b9609edf66 (patch) | |
| tree | 1d4680c875616673c0aa8f81ff6d1bfd41314598 /src/components/bookmark_timeline/bookmark_timeline.js | |
| parent | a8092de63808ff1445636f07e11f3602774f1438 (diff) | |
Bookmark folders
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'src/components/bookmark_timeline/bookmark_timeline.js')
| -rw-r--r-- | src/components/bookmark_timeline/bookmark_timeline.js | 19 |
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') } } |
