summaryrefslogtreecommitdiffstats
path: root/web/react/dispatcher
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-23 10:52:52 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-11-23 12:11:11 -0500
commit388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d (patch)
tree42b0d26b00915c755fe160f775cac26b13c353e0 /web/react/dispatcher
parent6016f91358fa81c01de72011bb34c98cf2851751 (diff)
downloadchat-388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d.tar.gz
chat-388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d.tar.bz2
chat-388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d.zip
Moved show static methods out of modals and into EventHelpers
Diffstat (limited to 'web/react/dispatcher')
-rw-r--r--web/react/dispatcher/event_helpers.jsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 85329b38f..d7f255aaa 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -81,3 +81,26 @@ export function emitPostDeletedEvent(post) {
post
});
}
+
+export function showDeletePostModal(post, commentCount = 0) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.TOGGLE_DELETE_POST_MODAL,
+ value: true,
+ post,
+ commentCount
+ });
+}
+
+export function showGetTeamInviteLinkModal() {
+ AppDispatcher.handleViewAction({
+ type: Constants.ActionTypes.TOGGLE_GET_TEAM_INVITE_LINK_MODAL,
+ value: true
+ });
+}
+
+export function showInviteMemberModal() {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.TOGGLE_INVITE_MEMBER_MODAL,
+ value: true
+ });
+}