[geary] Fix drafts not being saved unless a different from account is selected.



commit ec2fdb0e05e9b7ba38211e02d97429f96c303b4a
Author: Michael James Gratton <mike vee net>
Date:   Sat Oct 15 18:21:22 2016 +1100

    Fix drafts not being saved unless a different from account is selected.
    
    Finally(?) fix Bug 747627.
    
    * src/client/application/geary-controller.vala
      (GearyController::create_compose_widget_async): Always call
      open_draft_manager_async, not just when there is draft.

 src/client/application/geary-controller.vala |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index eabdb00..0e85cf4 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -2286,12 +2286,15 @@ public class GearyController : Geary.BaseObject {
             widget.state = ComposerWidget.ComposerState.DETACHED;
         }
 
+        Geary.EmailIdentifier? draft_id = null;
         if (is_draft) {
-            try {
-                yield widget.open_draft_manager_async(referred.id);
-            } catch (Error e) {
-                message("Could not open draft manager: %s", e.message);
-            }
+            draft_id = referred.id;
+        }
+
+        try {
+            yield widget.open_draft_manager_async(draft_id);
+        } catch (Error e) {
+            message("Could not open draft manager: %s", e.message);
         }
 
         // For accounts with large numbers of contacts, loading the


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]