mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-13 06:35:08 +01:00
Merge pull request #505 from ThibG/glitch-soc/features/fetch-relationships-on-search
[Glitch] Fetch relationships for search results in UI
This commit is contained in:
commit
7719fe0df2
@ -1,4 +1,5 @@
|
||||
import api from 'flavours/glitch/util/api';
|
||||
import { fetchRelationships } from './accounts';
|
||||
|
||||
export const SEARCH_CHANGE = 'SEARCH_CHANGE';
|
||||
export const SEARCH_CLEAR = 'SEARCH_CLEAR';
|
||||
@ -38,6 +39,7 @@ export function submitSearch() {
|
||||
},
|
||||
}).then(response => {
|
||||
dispatch(fetchSearchSuccess(response.data));
|
||||
dispatch(fetchRelationships(response.data.accounts.map(item => item.id)));
|
||||
}).catch(error => {
|
||||
dispatch(fetchSearchFail(error));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user