fix(mail): identify junk mailbox in lookup

Fixes #5482
This commit is contained in:
Francis Lachapelle
2022-02-11 08:03:25 -05:00
parent d9cb5785c6
commit fe038bb2ef

View File

@@ -72,6 +72,7 @@
#import "SOGoMailAccount.h"
#import "SOGoMailAccounts.h"
#import "SOGoTrashFolder.h"
#import "SOGoJunkFolder.h"
#import "SOGoMailObject+Draft.h"
@@ -1139,6 +1140,10 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSArray *uids)
isEqualToString:
[mailAccount trashFolderNameInContext: _ctx]])
className = @"SOGoTrashFolder";
else if ([fullFolderName
isEqualToString:
[mailAccount junkFolderNameInContext: _ctx]])
className = @"SOGoJunkFolder";
/* else if ([folderName isEqualToString:
[mailAccount sieveFolderNameInContext: _ctx]])
obj = [self lookupFiltersFolder: _key inContext: _ctx]; */