Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #167 from hyperspacedev/HD-48-stop-draft-after-post
Browse files Browse the repository at this point in the history
HD-48 #done
  • Loading branch information
alicerunsonfedora authored Jan 25, 2020
2 parents f2fe5cb + a922d58 commit 8696251
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/Compose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})

Expand Down

0 comments on commit 8696251

Please sign in to comment.