GNOME Bugzilla – Bug 730606
Archive then switch conversation gives unexpected "Close open drafts?" dialog
Last modified: 2017-01-16 05:39:45 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.
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.
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.
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.