diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-02-18 03:14:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 03:14:46 +0100 |
commit | cba2897108dffe69d5a16befe6c6220f6eaae59f (patch) | |
tree | e247261ff56fa1751e914d650a4a4710c6417dd1 /app/javascript | |
parent | 9b8a4484778fb55bcb2526992807a51270229b72 (diff) |
Cache relationships in API (#6482)
* Cache relationships in API * Fetch relationships for search results in UI * Only save one account's maps in each cache item
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/actions/search.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/mastodon/actions/search.js b/app/javascript/mastodon/actions/search.js index 78c6109f7..73cb106ec 100644 --- a/app/javascript/mastodon/actions/search.js +++ b/app/javascript/mastodon/actions/search.js @@ -1,4 +1,5 @@ import api from '../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)); }); |