From 247f55f673d13a1fcac5a14b3c771f5aafc2a73e Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 22 May 2018 13:05:40 +0200 Subject: [PATCH] [Glitch] Fetch relationships for search results in UI Port webui changes from cba2897108dffe69d5a16befe6c6220f6eaae59f to glitch-soc --- app/javascript/flavours/glitch/actions/search.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js index e86bd848e56..13885c60049 100644 --- a/app/javascript/flavours/glitch/actions/search.js +++ b/app/javascript/flavours/glitch/actions/search.js @@ -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)); });