(fix) fixed a potential EAS error with multiple email priority flags

This commit is contained in:
Ludovic Marcotte
2015-03-31 16:13:52 -04:00
parent ab121e6c15
commit b2d7eb40c2
2 changed files with 13 additions and 3 deletions
+11 -2
View File
@@ -600,7 +600,11 @@ struct GlobalObjectId {
// Importance
v = 0x1;
p = [[self mailHeaders] objectForKey: @"x-priority"];
value = [[self mailHeaders] objectForKey: @"x-priority"];
if ([value isKindOfClass: [NSArray class]])
p = [value lastObject];
else
p = value;
if (p)
{
@@ -611,7 +615,12 @@ struct GlobalObjectId {
}
else
{
p = [[self mailHeaders] objectForKey: @"importance"];
value = [[self mailHeaders] objectForKey: @"importance"];
if ([value isKindOfClass: [NSArray class]])
p = [value lastObject];
else
p = value;
if ([p hasPrefix: @"High"]) v = 0x2;
else if ([p hasPrefix: @"Low"]) v = 0x0;
}