mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-15 05:14:53 +00:00
Fix unseen count retrieval of nested IMAP folders
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user