diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-09 21:46:55 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-09 21:46:55 +0000 |
| commit | 7773e7de6454a7ecd79b695ba27cccabeaca184e (patch) | |
| tree | f14fc29167d7b2a21264351236f1721dd0794456 /src/components/lists_timeline/lists_timeline.js | |
| parent | 2867c696293a96375f60898e10d7a702f60855c5 (diff) | |
| parent | 891fbf996d7ddd415d99ea9065d54b0f493b5422 (diff) | |
Merge branch 'lists-implementation' into 'develop'
Add lists support
See merge request pleroma/pleroma-fe!1584
Diffstat (limited to 'src/components/lists_timeline/lists_timeline.js')
| -rw-r--r-- | src/components/lists_timeline/lists_timeline.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/lists_timeline/lists_timeline.js b/src/components/lists_timeline/lists_timeline.js new file mode 100644 index 00000000..7534420d --- /dev/null +++ b/src/components/lists_timeline/lists_timeline.js @@ -0,0 +1,36 @@ +import Timeline from '../timeline/timeline.vue' +const ListsTimeline = { + data () { + return { + listId: null + } + }, + components: { + Timeline + }, + computed: { + timeline () { return this.$store.state.statuses.timelines.list } + }, + watch: { + $route: function (route) { + if (route.name === 'lists-timeline' && route.params.id !== this.listId) { + this.listId = route.params.id + this.$store.dispatch('stopFetchingTimeline', 'list') + this.$store.commit('clearTimeline', { timeline: 'list' }) + this.$store.dispatch('fetchList', { id: this.listId }) + this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId }) + } + } + }, + created () { + this.listId = this.$route.params.id + this.$store.dispatch('fetchList', { id: this.listId }) + this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId }) + }, + unmounted () { + this.$store.dispatch('stopFetchingTimeline', 'list') + this.$store.commit('clearTimeline', { timeline: 'list' }) + } +} + +export default ListsTimeline |
