mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-01-14 03:32:56 -05:00
[Glitch] Fix to update suggestion list after dismiss
Port 9bb334184900f1a4bb0a212cf46542faa0c544fd to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
8fc0b592cb
commit
72eac238ba
@ -48,5 +48,12 @@ export const dismissSuggestion = accountId => (dispatch, getState) => {
|
||||
id: accountId,
|
||||
});
|
||||
|
||||
api(getState).delete(`/api/v1/suggestions/${accountId}`);
|
||||
api(getState).delete(`/api/v1/suggestions/${accountId}`).then(() => {
|
||||
dispatch(fetchSuggestionsRequest());
|
||||
|
||||
api(getState).get('/api/v2/suggestions').then(response => {
|
||||
dispatch(importFetchedAccounts(response.data.map(x => x.account)));
|
||||
dispatch(fetchSuggestionsSuccess(response.data));
|
||||
}).catch(error => dispatch(fetchSuggestionsFail(error)));
|
||||
}).catch(() => {});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user