summaryrefslogtreecommitdiffstats
path: root/webapp/components/search_results_header.jsx
diff options
context:
space:
mode:
authorPepijn <pepijnfens@gmail.com>2016-10-11 15:07:38 +0200
committerJoram Wilander <jwawilander@gmail.com>2016-10-11 09:07:38 -0400
commit944bb1ba615ef5205f33191a4542f36002a4db23 (patch)
tree8a95e4081e050298491c46520fa45eaa70ee5ec7 /webapp/components/search_results_header.jsx
parent6e9e41ebb500e0d343374421719f24c515958808 (diff)
downloadchat-944bb1ba615ef5205f33191a4542f36002a4db23.tar.gz
chat-944bb1ba615ef5205f33191a4542f36002a4db23.tar.bz2
chat-944bb1ba615ef5205f33191a4542f36002a4db23.zip
First commit for toggling mentions using shortcut and button (#4169)
Also did some refactoring and moved code to actions Fixed coding style errors
Diffstat (limited to 'webapp/components/search_results_header.jsx')
-rw-r--r--webapp/components/search_results_header.jsx21
1 files changed, 2 insertions, 19 deletions
diff --git a/webapp/components/search_results_header.jsx b/webapp/components/search_results_header.jsx
index 8fbe4ab1f..6bcb3f40a 100644
--- a/webapp/components/search_results_header.jsx
+++ b/webapp/components/search_results_header.jsx
@@ -1,14 +1,12 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import Constants from 'utils/constants.jsx';
import {Tooltip, OverlayTrigger} from 'react-bootstrap';
+import * as GlobalActions from 'actions/global_actions.jsx';
import {FormattedMessage} from 'react-intl';
-var ActionTypes = Constants.ActionTypes;
-
import React from 'react';
export default class SearchResultsHeader extends React.Component {
@@ -22,22 +20,7 @@ export default class SearchResultsHeader extends React.Component {
handleClose(e) {
e.preventDefault();
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_SEARCH,
- results: null
- });
-
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_SEARCH_TERM,
- term: null,
- do_search: false,
- is_mention_search: false
- });
-
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_POST_SELECTED,
- postId: null
- });
+ GlobalActions.toggleSideBarAction(false);
this.props.shrink();
}