diff --git a/NEWS b/NEWS index def1b5f6e..319fac4d9 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,7 @@ Bug fixes - [web] fixed fab button position in Calendar module (#3462) - [web] fixed default priority of sent messages (#3542) - [web] removed double-quotes from Chinese (Taiwan) translations that were breaking templates + - [web] fixed unseen count retrieval of nested IMAP folders - [eas] allow EAS attachments get on 2nd-level mailboxes (#3505) - [eas] fix EAS bday shift (#3518) diff --git a/SoObjects/Mailer/SOGoMailAccount.h b/SoObjects/Mailer/SOGoMailAccount.h index b60f274bb..3daee9e2a 100644 --- a/SoObjects/Mailer/SOGoMailAccount.h +++ b/SoObjects/Mailer/SOGoMailAccount.h @@ -90,7 +90,11 @@ typedef enum { - (BOOL) isInDraftsFolder; -/* special folders */ +- (id) lookupNameByPaths: (NSArray *) _paths + inContext: (id)_ctx + acquire: (BOOL) _flag; + + /* special folders */ - (NSString *) inboxFolderNameInContext: (id)_ctx; - (NSString *) draftsFolderNameInContext: (id)_ctx; - (NSString *) sentFolderNameInContext: (id)_ctx; diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index edaa71d6c..a8c625e0b 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -819,6 +819,25 @@ static NSString *inboxFolderName = @"INBOX"; /* name lookup */ +- (id) lookupNameByPaths: (NSArray *) _paths + inContext: (id)_ctx + acquire: (BOOL) _flag +{ + NSString *folderName; + NSUInteger count, max; + SOGoMailBaseObject *folder; + + max = [_paths count]; + folder = self; + for (count = 0; folder && count < max; count++) + { + folderName = [_paths objectAtIndex: count]; + folder = [folder lookupName: folderName inContext: _ctx acquire: _flag]; + } + + return folder; +} + - (id) lookupName: (NSString *) _key inContext: (id)_ctx acquire: (BOOL) _flag diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 782322229..635a3f27a 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -641,10 +641,9 @@ account = [[self clientObject] lookupName: [pathComponents objectAtIndex: 0] inContext: context acquire: YES]; - - folder = [account lookupName: [NSString pathWithComponents: [pathComponents subarrayWithRange: NSMakeRange(1, [pathComponents count]-1)]] - inContext: context - acquire: YES]; + folder = [account lookupNameByPaths: [pathComponents subarrayWithRange: NSMakeRange(1, [pathComponents count]-1)] + inContext: context + acquire: YES]; return [folder unseenCount]; }