-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft should only be deleted if post is successful. #18
Comments
I feel like this kind of logic should be done through the backend. We can easily pass the draft ID in the request, and listening to the Posted and Started events for posts and discussions respectively should do the trick. |
We'd still need to remove it from the frontend UI, or at least set off a refresh call to the API, which we wouldn't know when to do. |
You can just use We could also add a timeout and check if the user starts typing again, and there's a connected draft ID, to fetch the store-removed draft and bring it back to the frontend store. |
Problem with this is, there's nothing in the sent post linking it to a draft, so we'd need to know which drafts to delete. |
A PR to core and byobu (and tags) needs to be submitted so that the onsubmit methods of the composers return promises. Then, we can extend that to add a
.then
, which will allow us to only delete on successful submit.The text was updated successfully, but these errors were encountered: