diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-12-03 08:23:43 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-12-03 08:23:43 -0500 |
commit | e92695c4a4a027e428ad32b69583bee25a3ba24a (patch) | |
tree | f81fb936fff2a2e64c64d92b5181ae610574304b /web/react/stores/search_store.jsx | |
parent | eddd4e0fc49582cf7f484168f5e2c08b0ac89596 (diff) | |
parent | 482e3fc9a494a54df53d99b060a7cfa13b3d95c0 (diff) | |
download | chat-e92695c4a4a027e428ad32b69583bee25a3ba24a.tar.gz chat-e92695c4a4a027e428ad32b69583bee25a3ba24a.tar.bz2 chat-e92695c4a4a027e428ad32b69583bee25a3ba24a.zip |
Merge pull request #1579 from hmhealey/plt1298
PLT-1298 Converted Command and @Mention autocomplete to new suggestion components
Diffstat (limited to 'web/react/stores/search_store.jsx')
-rw-r--r-- | web/react/stores/search_store.jsx | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/web/react/stores/search_store.jsx b/web/react/stores/search_store.jsx index e8ab6a2ae..f932c379a 100644 --- a/web/react/stores/search_store.jsx +++ b/web/react/stores/search_store.jsx @@ -12,8 +12,6 @@ var ActionTypes = Constants.ActionTypes; var CHANGE_EVENT = 'change'; var SEARCH_CHANGE_EVENT = 'search_change'; var SEARCH_TERM_CHANGE_EVENT = 'search_term_change'; -var MENTION_DATA_CHANGE_EVENT = 'mention_data_change'; -var ADD_MENTION_EVENT = 'add_mention'; var SHOW_SEARCH_EVENT = 'show_search'; class SearchStoreClass extends EventEmitter { @@ -32,10 +30,6 @@ class SearchStoreClass extends EventEmitter { this.addSearchTermChangeListener = this.addSearchTermChangeListener.bind(this); this.removeSearchTermChangeListener = this.removeSearchTermChangeListener.bind(this); - this.emitMentionDataChange = this.emitMentionDataChange.bind(this); - this.addMentionDataChangeListener = this.addMentionDataChangeListener.bind(this); - this.removeMentionDataChangeListener = this.removeMentionDataChangeListener.bind(this); - this.emitShowSearch = this.emitShowSearch.bind(this); this.addShowSearchListener = this.addShowSearchListener.bind(this); this.removeShowSearchListener = this.removeShowSearchListener.bind(this); @@ -113,30 +107,6 @@ class SearchStoreClass extends EventEmitter { return BrowserStore.getItem('search_term'); } - emitMentionDataChange(id, mentionText) { - this.emit(MENTION_DATA_CHANGE_EVENT, id, mentionText); - } - - addMentionDataChangeListener(callback) { - this.on(MENTION_DATA_CHANGE_EVENT, callback); - } - - removeMentionDataChangeListener(callback) { - this.removeListener(MENTION_DATA_CHANGE_EVENT, callback); - } - - emitAddMention(id, username) { - this.emit(ADD_MENTION_EVENT, id, username); - } - - addAddMentionListener(callback) { - this.on(ADD_MENTION_EVENT, callback); - } - - removeAddMentionListener(callback) { - this.removeListener(ADD_MENTION_EVENT, callback); - } - storeSearchResults(results, isMentionSearch) { BrowserStore.setItem('search_results', results); BrowserStore.setItem('is_mention_search', Boolean(isMentionSearch)); @@ -157,12 +127,6 @@ SearchStore.dispatchToken = AppDispatcher.register((payload) => { SearchStore.storeSearchTerm(action.term); SearchStore.emitSearchTermChange(action.do_search, action.is_mention_search); break; - case ActionTypes.RECIEVED_MENTION_DATA: - SearchStore.emitMentionDataChange(action.id, action.mention_text); - break; - case ActionTypes.RECIEVED_ADD_MENTION: - SearchStore.emitAddMention(action.id, action.username); - break; case ActionTypes.SHOW_SEARCH: SearchStore.emitShowSearch(); break; |