mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Prevent multiple clicks on post retry (#6055)
This commit is contained in:
committed by
Corey Hulen
parent
f961378600
commit
9b9788cf11
@@ -14,13 +14,23 @@ import React from 'react';
|
||||
export default class PendingPostOptions extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.retryPost = this.retryPost.bind(this);
|
||||
this.cancelPost = this.cancelPost.bind(this);
|
||||
|
||||
this.submitting = false;
|
||||
|
||||
this.state = {};
|
||||
}
|
||||
retryPost(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.submitting) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.submitting = true;
|
||||
|
||||
var post = this.props.post;
|
||||
queuePost(post, true, null,
|
||||
(err) => {
|
||||
@@ -30,9 +40,7 @@ export default class PendingPostOptions extends React.Component {
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
this.setState({
|
||||
submitting: false
|
||||
});
|
||||
this.submitting = false;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user