From 55b5ecd2362ed269c91961c8b55dabaa18842598 Mon Sep 17 00:00:00 2001 From: Charles Lindsay Date: Wed, 15 Jan 2014 15:40:06 -0800 Subject: [PATCH] Properly create special folders for other accounts Closes: bgo #714103 --- .../other/imap-engine-other-account.vala | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/engine/imap-engine/other/imap-engine-other-account.vala b/src/engine/imap-engine/other/imap-engine-other-account.vala index 52d1f25a..419a4320 100644 --- a/src/engine/imap-engine/other/imap-engine-other-account.vala +++ b/src/engine/imap-engine/other/imap-engine-other-account.vala @@ -18,7 +18,22 @@ private class Geary.ImapEngine.OtherAccount : Geary.ImapEngine.GenericAccount { else type = local_folder.get_properties().attrs.get_special_folder_type(); - return new OtherFolder(this, remote_account, local_account, local_folder, type); + switch (type) { + case SpecialFolderType.SENT: + return new GenericSentMailFolder(this, remote_account, local_account, local_folder, + type); + + case SpecialFolderType.TRASH: + return new GenericTrashFolder(this, remote_account, local_account, local_folder, + type); + + case SpecialFolderType.DRAFTS: + return new GenericDraftsFolder(this, remote_account, local_account, local_folder, + type); + + default: + return new OtherFolder(this, remote_account, local_account, local_folder, type); + } } }