-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add "Drafts" to Input #262
Conversation
This looks and feels good, similar to how Discord, Slack and other applications behave. |
Oops, sorry about that. CHANGELOG entry added. Happy to provide the single-pane-user perspective. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve, and wait to see if @tarkah has any additional comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome as always @andymandias! I've done a little cleanup, mainly removing the unneeded state on input_view::State
since we can just update / reference the draft value from our stored history manager -> input widget.
… when switching between channels/queries/servers.
We can use the stored draft data in history::Manager as the text used by our input view, so we don't need to also store / update / refrence in the input view state. This eliminates de-sync risk and cuts out some unnecessary code. Also rearranged / renamed things a little.
8fabf66
to
588a38a
Compare
This PR is to automatically store the contents of the input view, such that non-sent messages will persist when switching between channels/queries/servers. I.e. if I type out a part of a message for a channel, switch to another channel to reference other messages, then when I switch back to the original channel the part of the message that I typed will be restored. Previously, when switching channels the input is cleared and anything that has been typed is lost.