[geary] Fix support for gmail drafts



commit cca339c4f3ec672956ba6e246394243c3c45ef93
Author: Charles Lindsay <chaz yorba org>
Date:   Mon Feb 17 16:18:01 2014 -0800

    Fix support for gmail drafts
    
    Closes: bgo #724395

 .../gmail/imap-engine-gmail-account.vala           |    5 +++++
 .../gmail/imap-engine-gmail-folder.vala            |    9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala 
b/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
index cf0c3d0..aad5ea4 100644
--- a/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
+++ b/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
@@ -84,6 +84,11 @@ private class Geary.ImapEngine.GmailAccount : Geary.ImapEngine.GenericAccount {
                 return new MinimalFolder(this, remote_account, local_account, local_folder,
                     special_folder_type);
             
+            case SpecialFolderType.DRAFTS:
+            case SpecialFolderType.TRASH:
+                return new GenericFolder(this, remote_account, local_account, local_folder,
+                    special_folder_type);
+            
             default:
                 return new GmailFolder(this, remote_account, local_account, local_folder, 
special_folder_type);
         }
diff --git a/src/engine/imap-engine/gmail/imap-engine-gmail-folder.vala 
b/src/engine/imap-engine/gmail/imap-engine-gmail-folder.vala
index 3151c3b..e8839c0 100644
--- a/src/engine/imap-engine/gmail/imap-engine-gmail-folder.vala
+++ b/src/engine/imap-engine/gmail/imap-engine-gmail-folder.vala
@@ -4,12 +4,19 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-private class Geary.ImapEngine.GmailFolder : MinimalFolder, FolderSupport.Archive {
+private class Geary.ImapEngine.GmailFolder : MinimalFolder, FolderSupport.Archive,
+    FolderSupport.Create {
     public GmailFolder(GmailAccount account, Imap.Account remote, ImapDB.Account local,
         ImapDB.Folder local_folder, SpecialFolderType special_folder_type) {
         base (account, remote, local, local_folder, special_folder_type);
     }
     
+    public new async Geary.EmailIdentifier? create_email_async(
+        RFC822.Message rfc822, Geary.EmailFlags? flags, DateTime? date_received,
+        Geary.EmailIdentifier? id, Cancellable? cancellable = null) throws Error {
+        return yield base.create_email_async(rfc822, flags, date_received, id, cancellable);
+    }
+    
     public async void archive_email_async(Gee.List<Geary.EmailIdentifier> email_ids,
         Cancellable? cancellable = null) throws Error {
         yield expunge_email_async(email_ids, cancellable);


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