aboutsummaryrefslogtreecommitdiff
path: root/src/modules/api.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2022-08-09 21:46:55 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2022-08-09 21:46:55 +0000
commit7773e7de6454a7ecd79b695ba27cccabeaca184e (patch)
treef14fc29167d7b2a21264351236f1721dd0794456 /src/modules/api.js
parent2867c696293a96375f60898e10d7a702f60855c5 (diff)
parent891fbf996d7ddd415d99ea9065d54b0f493b5422 (diff)
Merge branch 'lists-implementation' into 'develop'
Add lists support See merge request pleroma/pleroma-fe!1584
Diffstat (limited to 'src/modules/api.js')
-rw-r--r--src/modules/api.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/modules/api.js b/src/modules/api.js
index 28f2076e..80a978f9 100644
--- a/src/modules/api.js
+++ b/src/modules/api.js
@@ -191,12 +191,13 @@ const api = {
startFetchingTimeline (store, {
timeline = 'friends',
tag = false,
- userId = false
+ userId = false,
+ listId = false
}) {
if (store.state.fetchers[timeline]) return
const fetcher = store.state.backendInteractor.startFetchingTimeline({
- timeline, store, userId, tag
+ timeline, store, userId, listId, tag
})
store.commit('addFetcher', { fetcherName: timeline, fetcher })
},
@@ -248,6 +249,18 @@ const api = {
store.commit('setFollowRequests', requests)
},
+ // Lists
+ startFetchingLists (store) {
+ if (store.state.fetchers.lists) return
+ const fetcher = store.state.backendInteractor.startFetchingLists({ store })
+ store.commit('addFetcher', { fetcherName: 'lists', fetcher })
+ },
+ stopFetchingLists (store) {
+ const fetcher = store.state.fetchers.lists
+ if (!fetcher) return
+ store.commit('removeFetcher', { fetcherName: 'lists', fetcher })
+ },
+
// Pleroma websocket
setWsToken (store, token) {
store.commit('setWsToken', token)