diff --git a/ChangeLog b/ChangeLog index be72af166..18d1c2849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,12 @@ (-davCalendarUserAddressSet): Modified to honor SOGoHideSystemEMail domain default. + * SoObjects/Mailer/SOGoDraftObject.m (-lookupName:...): + We prioritize the lookup of the "Drafts" folder over the + "Sent" one if both are matching. + + * SoObjects/Mailer/SOGoMailFolder.m: Same as above. + 2012-04-25 Jean Raby diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index 448b7b2a4..cbb8315d8 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -546,12 +546,12 @@ static NSString *inboxFolderName = @"INBOX"; [self _appendNamespaces: namespaces]; if ([namespaces containsObject: folderName]) klazz = [SOGoMailNamespace class]; - else if ([folderName - isEqualToString: [self sentFolderNameInContext: _ctx]]) - klazz = [SOGoSentFolder class]; else if ([folderName isEqualToString: [self draftsFolderNameInContext: _ctx]]) klazz = [SOGoDraftsFolder class]; + else if ([folderName + isEqualToString: [self sentFolderNameInContext: _ctx]]) + klazz = [SOGoSentFolder class]; else if ([folderName isEqualToString: [self trashFolderNameInContext: _ctx]]) klazz = [SOGoTrashFolder class]; diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index a60d14f07..f13415e15 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -870,13 +870,13 @@ static NSString *defaultUserID = @"anyone"; fullFolderName = [NSString stringWithFormat: @"%@/%@", [self traversalFromMailAccount], folderName]; if ([fullFolderName - isEqualToString: - [mailAccount sentFolderNameInContext: _ctx]]) - className = @"SOGoSentFolder"; - else if ([fullFolderName isEqualToString: [mailAccount draftsFolderNameInContext: _ctx]]) className = @"SOGoDraftsFolder"; + else if ([fullFolderName + isEqualToString: + [mailAccount sentFolderNameInContext: _ctx]]) + className = @"SOGoSentFolder"; else if ([fullFolderName isEqualToString: [mailAccount trashFolderNameInContext: _ctx]])