mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Fix to update suggestion list after dismiss (#16044)
* Fix to update suggestion list after dismiss * Change to inline * Fix style
This commit is contained in:
parent
3b8d085436
commit
9bb3341849
@ -48,5 +48,12 @@ export const dismissSuggestion = accountId => (dispatch, getState) => {
|
|||||||
id: accountId,
|
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…
Reference in New Issue
Block a user