Clear search term before displaying flagged posts (#3802)

This commit is contained in:
Joram Wilander
2016-08-16 14:52:56 -04:00
committed by Christopher Speller
parent ad6363079d
commit ccf9778520

View File

@@ -134,18 +134,18 @@ export function unflagPost(postId, success) {
export function getFlaggedPosts() {
Client.getFlaggedPosts(0, Constants.POST_CHUNK_SIZE,
(data) => {
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_SEARCH,
results: data,
is_flagged_posts: true
});
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_SEARCH_TERM,
term: null,
do_search: false,
is_mention_search: false
});
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_SEARCH,
results: data,
is_flagged_posts: true
});
},
(err) => {
AsyncClient.dispatchError(err, 'getFlaggedPosts');