Fix unseen count retrieval of nested IMAP folders

This commit is contained in:
Francis Lachapelle
2016-02-26 14:59:54 -05:00
parent 50c790c846
commit a668d89ef9
4 changed files with 28 additions and 5 deletions
+5 -1
View File
@@ -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;
+19
View File
@@ -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