After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743067 - Properly restore state of drafts
Properly restore state of drafts
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: client
unspecified
Other All
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
review
Depends on:
Blocks:
 
 
Reported: 2015-01-16 22:42 UTC by Robert Schroll
Modified: 2015-01-17 00:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Properly restore state of drafts (19.48 KB, patch)
2015-01-16 22:42 UTC, Robert Schroll
none Details | Review
Properly restore state of drafts (19.57 KB, patch)
2015-01-16 23:44 UTC, Robert Schroll
committed Details | Review

Description Robert Schroll 2015-01-16 22:42:04 UTC
Currently drafts are restored into an inconsistent mix of INLINE and 
INLINE_NEW.
Comment 1 Robert Schroll 2015-01-16 22:42:06 UTC
Created attachment 294714 [details] [review]
Properly restore state of drafts

We do this heuristically, by noting which messages it is in reply to and
seeing if it matches the unmodified reply or reply all states.  This
isn't perfect; notably forwarded messages are picked up.

We hide the existing draft in the conversation viewer as soon as we open
the composer.  We also ensure that future versions of this draft will
also be hidden.  The list of emails to be hidden is cleared when the
conversation viewer is, so we query all open composers at this point to
see which email ids should be hidden.
Comment 2 Robert Schroll 2015-01-16 23:44:25 UTC
Created attachment 294715 [details] [review]
Properly restore state of drafts

Sometimes we end up passing a null id to the blacklist code.  I'm not 
sure why this happens, but let's no freak out when it does.
Comment 3 Jim Nelson 2015-01-16 23:55:25 UTC
Review of attachment 294715 [details] [review]:

Commit!
Comment 4 Robert Schroll 2015-01-17 00:44:14 UTC
Attachment 294715 [details] pushed as 0958273 - Properly restore state of drafts