Load profiles for search results (#4519)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
41b31b4c92
Коммит
2fdb33042a
@@ -232,7 +232,7 @@ export function loadPostsAfter(postId, offset, numPost, isPost) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadProfilesForPosts(posts) {
|
export function loadProfilesForPosts(posts) {
|
||||||
const profilesToLoad = {};
|
const profilesToLoad = {};
|
||||||
for (const pid in posts) {
|
for (const pid in posts) {
|
||||||
if (!posts.hasOwnProperty(pid)) {
|
if (!posts.hasOwnProperty(pid)) {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import SearchSuggestionList from './suggestion/search_suggestion_list.jsx';
|
|||||||
import SearchUserProvider from './suggestion/search_user_provider.jsx';
|
import SearchUserProvider from './suggestion/search_user_provider.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
import {loadProfilesForPosts} from 'actions/post_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||||
|
|
||||||
@@ -129,6 +130,8 @@ export default class SearchBar extends React.Component {
|
|||||||
results: data,
|
results: data,
|
||||||
is_mention_search: isMentionSearch
|
is_mention_search: isMentionSearch
|
||||||
});
|
});
|
||||||
|
|
||||||
|
loadProfilesForPosts(data.posts);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
this.setState({isSearching: false});
|
this.setState({isSearching: false});
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user