summaryrefslogtreecommitdiffstats
path: root/web/react/dispatcher
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-12-02 09:21:58 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-12-02 09:21:58 -0500
commit07f0df6af428a56a4abedde841a0813e2802cd2b (patch)
tree7f2b7e913ac91ed6ee1bacaa0831c37b71c549d8 /web/react/dispatcher
parent06e0919bca7ee4280c6eed58838ca2be10e7b4fb (diff)
downloadchat-07f0df6af428a56a4abedde841a0813e2802cd2b.tar.gz
chat-07f0df6af428a56a4abedde841a0813e2802cd2b.tar.bz2
chat-07f0df6af428a56a4abedde841a0813e2802cd2b.zip
Moved action creation for suggestions
Diffstat (limited to 'web/react/dispatcher')
-rw-r--r--web/react/dispatcher/event_helpers.jsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 856eec2f1..47d6b150e 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -111,3 +111,33 @@ export function showRegisterAppModal() {
value: true
});
}
+
+export function emitSuggestionPretextChanged(suggestionId, pretext) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_PRETEXT_CHANGED,
+ id: suggestionId,
+ pretext
+ });
+}
+
+export function emitSelectNextSuggestion(suggestionId) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_SELECT_NEXT,
+ id: suggestionId
+ });
+}
+
+export function emitSelectPreviousSuggestion(suggestionId) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_SELECT_PREVIOUS,
+ id: suggestionId
+ });
+}
+
+export function emitCompleteWordSuggestion(suggestionId, term = '') {
+ AppDispatcher.handleViewAction({
+ type: Constants.ActionTypes.SUGGESTION_COMPLETE_WORD,
+ id: suggestionId,
+ term
+ });
+}