Update drafts in all thread-views when edited
[NOTE: Since the amount of code I am proposing is very small (cf. attached patch), compared to the discussions that this might deserve, I've opted to make it an issue instead of a PR. END NOTE]
I have a startup query "tag:draft". From that thread index, I can edit a draft message directly by hitting "E". This works fine; I can edit and save the draft as expected.
I start getting confused however, when I first hit "Enter" to bring up a thread view for one of the drafts. This opens a new tab, where the draft message is preceded by a red bar ("press E to edit or D to delete"). If I now hit "E", I can edit and save the draft as expected. When I save the draft again, the editor tab is closed, and I am back in the thread view with the red warning bar. But that view does not reflect the changes I have made and saved. This is confusing.
In the simplest case, we could just close the red-bar-threa-view when "E" is pressed. Here is a patch that implements this: thread-view-edit-draft.diff.txt
The proper fix for this is to update/remove the message from the open thread-view, closing if there are no more messages in the thread. The framework code is ready in #455 (which obviously isn't quite ready yet).
Think this is a duplicate of #431?
Think this is a duplicate of #431?
Sort of related, yet different. @MarcinWieczorek comes from deleting it, I come from editing, and then saving it. The fix would likely be the same (calling something like QueryLoader::reload ()), but from two different register_key () calls.
If you want to handle both under one issue, I'm not against closing this issue as a duplicate of #431, provided that the scope of #431 is extended to to also cover editing drafts.
Let's extend #431.
Or never mind, let's keep em separated.