diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-03-05 20:15:43 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-03-05 21:35:03 +0100 |
commit | 0d19fcc2fb8579a61b87206a9376cf113d82ccf4 (patch) | |
tree | 2e4e7a109ad51ceecf7c48b5c7a932a7ffa1673d /app/javascript/flavours/glitch/actions/mutes.js | |
parent | cce1c3252f271bb5daa5ace05c971d6e1b8f298d (diff) |
Port upstream refactoring of reducers and actions
Also includes 9e45b051cfea667f9ca3d3c72d13022259315090
Diffstat (limited to 'app/javascript/flavours/glitch/actions/mutes.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/mutes.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/mutes.js b/app/javascript/flavours/glitch/actions/mutes.js index e06130533..927fc7415 100644 --- a/app/javascript/flavours/glitch/actions/mutes.js +++ b/app/javascript/flavours/glitch/actions/mutes.js @@ -1,5 +1,6 @@ import api, { getLinks } from 'flavours/glitch/util/api'; import { fetchRelationships } from './accounts'; +import { importFetchedAccounts } from './importer'; import { openModal } from 'flavours/glitch/actions/modal'; export const MUTES_FETCH_REQUEST = 'MUTES_FETCH_REQUEST'; @@ -19,6 +20,7 @@ export function fetchMutes() { api(getState).get('/api/v1/mutes').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data)); dispatch(fetchMutesSuccess(response.data, next ? next.uri : null)); dispatch(fetchRelationships(response.data.map(item => item.id))); }).catch(error => dispatch(fetchMutesFail(error))); @@ -58,6 +60,7 @@ export function expandMutes() { api(getState).get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data)); dispatch(expandMutesSuccess(response.data, next ? next.uri : null)); dispatch(fetchRelationships(response.data.map(item => item.id))); }).catch(error => dispatch(expandMutesFail(error))); |