Browse Source

[Glitch] Fetch relationships for search results in UI

Port webui changes from cba2897108 to glitch-soc
closed-social-glitch-2
Thibaut Girka 6 years ago
parent
commit
247f55f673
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/javascript/flavours/glitch/actions/search.js

+ 2
- 0
app/javascript/flavours/glitch/actions/search.js View File

@ -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…
Cancel
Save