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 730606 - Archive then switch conversation gives unexpected "Close open drafts?" dialog
Archive then switch conversation gives unexpected "Close open drafts?" dialog
Status: RESOLVED OBSOLETE
Product: geary
Classification: Other
Component: composer
master
Other Linux
: High normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-22 23:23 UTC by Jim Nelson
Modified: 2017-01-16 05:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jim Nelson 2014-05-22 23:23:22 UTC
To repro (with auto-select conversations turned off):

* Select a conversation
* Press the Reply button
* Archive the conversation

Note that no warning message appears at this moment.

* Select another conversation

Now the "Close open draft messages?" dialog appears.  Since there's no composer(s) visible on the screen, this looks odd.

The warning should probably happen when Archive/Delete/Trash is pressed.  Since a conversation can also be moved via the drop-down menu or Marked as Spam, it really should appear any time the conversation is about to be dissolved.
Comment 1 Robert Schroll 2014-05-23 05:43:53 UTC
Is there any common code path that these various actions hit as they're clearing the conversation?  If not, I guess we've got to make one.
Comment 2 Jim Nelson 2014-05-23 19:38:01 UTC
I believe they all call ConversationMonitor.clear(), but like some of the issues we encountered landing inline composer, it's too late by that point to intercept and cancel the operation.

They all flow through GearyController, so I think that's the key here.  I think we'll need to add a check call there that can return false/cancel/no which action signal handlers would have to respect.
Comment 3 Michael Gratton 2017-01-16 05:39:45 UTC
Following the directions above, I can no longer reproduce this on master — the dialog now appears before the archive/delete/etc operation occurs and the action does not take place if Cancel is selected, but I'm not sure why.

The GearyController::can_switch_conversation_view test that calls ::should_create_new_composer is clearly what is responsible, but there's only been some minor changes there. There have been a lot of changes to how composers are managed, with Bug 765516 and elsewhere.

Going to close this as obsolete, feel free to re-open if there is some way to reproduce again.