about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-05-22 13:05:40 +0200
committerThibaut Girka <thib@sitedethib.com>2018-05-22 13:05:40 +0200
commit247f55f673d13a1fcac5a14b3c771f5aafc2a73e (patch)
tree2941455de1caa71d5ff1b35d8b196b607d36237d /app/javascript/flavours/glitch
parent2289250f69e78a8888f8fc4db7ec24a1049c161e (diff)
[Glitch] Fetch relationships for search results in UI
Port webui changes from cba2897108dffe69d5a16befe6c6220f6eaae59f to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/actions/search.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js
index e86bd848e..13885c600 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));
     });