From 2abcdfe76a49eb1150eb1d1effd3229c929b6c27 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Mon, 10 Jul 2023 08:33:32 -0400 Subject: [PATCH] [MM-53430] Don't stop the `isDraftSubmitting` flow when the notification modal is popped (#23962) * [MM-53430] Don't stop the `isDraftSubmitting` flow when the notification modal is popped * Reset to false if the modal closes without confirming --- .../advanced_create_comment/advanced_create_comment.tsx | 4 +++- .../components/advanced_create_post/advanced_create_post.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/channels/src/components/advanced_create_comment/advanced_create_comment.tsx b/webapp/channels/src/components/advanced_create_comment/advanced_create_comment.tsx index c384956538..c9e5b08a36 100644 --- a/webapp/channels/src/components/advanced_create_comment/advanced_create_comment.tsx +++ b/webapp/channels/src/components/advanced_create_comment/advanced_create_comment.tsx @@ -475,6 +475,9 @@ class AdvancedCreateComment extends React.PureComponent { channelTimezoneCount, memberNotifyCount, onConfirm: () => this.handleNotifyAllConfirmation(), + onExited: () => { + this.isDraftSubmitting = false; + }, }, }); }; @@ -650,7 +653,6 @@ class AdvancedCreateComment extends React.PureComponent { if (memberNotifyCount > 0) { this.showNotifyAllModal(mentions, channelTimezoneCount, memberNotifyCount); - this.isDraftSubmitting = false; return; } diff --git a/webapp/channels/src/components/advanced_create_post/advanced_create_post.tsx b/webapp/channels/src/components/advanced_create_post/advanced_create_post.tsx index b56d09e88e..f8471921e7 100644 --- a/webapp/channels/src/components/advanced_create_post/advanced_create_post.tsx +++ b/webapp/channels/src/components/advanced_create_post/advanced_create_post.tsx @@ -585,6 +585,9 @@ class AdvancedCreatePost extends React.PureComponent { channelTimezoneCount, memberNotifyCount, onConfirm: () => this.handleNotifyAllConfirmation(), + onExited: () => { + this.isDraftSubmitting = false; + }, }, }); }; @@ -689,7 +692,6 @@ class AdvancedCreatePost extends React.PureComponent { return; } else if (memberNotifyCount > 0) { this.showNotifyAllModal(mentions, channelTimezoneCount, memberNotifyCount); - this.isDraftSubmitting = false; return; }