Added (slightly modified) patch from #2806
parent
0f04be2bcb
commit
f48839bf55
|
@ -761,7 +761,7 @@ struct GlobalObjectId {
|
|||
|
||||
// Flags
|
||||
[s appendString: @"<Flag xmlns=\"Email:\">"];
|
||||
[s appendFormat: @"<FlagStatus>%d</FlagStatus>", 0];
|
||||
[s appendFormat: @"<FlagStatus>%d</FlagStatus>", ([self flagged] ? 2 : 0)];
|
||||
[s appendString: @"</Flag>"];
|
||||
|
||||
// FIXME - support these in the future
|
||||
|
@ -799,10 +799,21 @@ struct GlobalObjectId {
|
|||
|
||||
if ((o = [theValues objectForKey: @"Flag"]))
|
||||
{
|
||||
o = [o objectForKey: @"FlagStatus"];
|
||||
|
||||
if ([o intValue])
|
||||
[self addFlags: @"\\Flagged"];
|
||||
// We must handle empty flags -> {Flag = ""; } - some ActiveSync clients, like the HTC Desire
|
||||
// will send an empty Flag message when "unflagging" a mail.
|
||||
if (([o isKindOfClass: [NSMutableDictionary class]]))
|
||||
{
|
||||
if ((o = [o objectForKey: @"FlagStatus"]))
|
||||
{
|
||||
// 0 = The flag is cleared.
|
||||
// 1 = The status is set to complete.
|
||||
// 2 = The status is set to active.
|
||||
if (([o isEqualToString: @"2"]))
|
||||
[self addFlags: @"\\Flagged"];
|
||||
else
|
||||
[self removeFlags: @"\\Flagged"];
|
||||
}
|
||||
}
|
||||
else
|
||||
[self removeFlags: @"\\Flagged"];
|
||||
}
|
||||
|
|
2
NEWS
2
NEWS
|
@ -6,7 +6,7 @@ Enhancements
|
|||
- implemented the GetAttachment ActiveSync command (#2808)
|
||||
|
||||
Bug fixes
|
||||
|
||||
- better handling of empty "Flag" messages over ActiveSync (#2806)
|
||||
|
||||
2.2.5 (2014-06-05)
|
||||
------------------
|
||||
|
|
|
@ -114,6 +114,7 @@ NSArray *SOGoMailCoreInfoKeys;
|
|||
- (NSException *) removeFlags:(id)_f;
|
||||
|
||||
- (BOOL) isNewMail; /* \Recent */
|
||||
- (BOOL) flagged; /* \Flagged */
|
||||
- (BOOL) read; /* \Unseen */
|
||||
- (BOOL) replied; /* \Answered */
|
||||
- (BOOL) forwarded; /* $forwarded */
|
||||
|
|
|
@ -1464,6 +1464,11 @@ static BOOL debugSoParts = NO;
|
|||
return [self _hasFlag: @"seen"];
|
||||
}
|
||||
|
||||
- (BOOL) flagged
|
||||
{
|
||||
return [self _hasFlag: @"flagged"];
|
||||
}
|
||||
|
||||
- (BOOL) replied
|
||||
{
|
||||
return [self _hasFlag: @"answered"];
|
||||
|
|
Loading…
Reference in New Issue