Merge pull request #167 from hyperspacedev/HD-48-stop-draft-after-post

HD-48 #done
This commit is contained in:
Marquis Kurt 2020-01-25 15:06:07 -05:00 committed by GitHub
commit 8696251824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -626,9 +626,15 @@ class Composer extends Component<any, IComposerState> {
: null
})
// If we succeed, send a success message and go back.
// If we succeed, send a success message, clear the status
// text field, and go back.
.then(() => {
this.props.enqueueSnackbar("Posted!");
// This is necessary to prevent session drafts from saving
// posts that were already posted.
this.setState({ text: "" });
window.history.back();
})