mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 08:23:28 +00:00
oc-appointments: ignore alarms already triggered
This commit is contained in:
@@ -1835,16 +1835,25 @@ ReservedBlockEE2Size: 00 00 00 00
|
|||||||
NSArray *alarms;
|
NSArray *alarms;
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
iCalAlarm *currentAlarm;
|
iCalAlarm *currentAlarm;
|
||||||
NSString *action;
|
NSString *action, *webstatus;
|
||||||
|
|
||||||
alarms = [event alarms];
|
alarms = [event alarms];
|
||||||
max = [alarms count];
|
max = [alarms count];
|
||||||
for (count = 0; !alarm && count < max; count++)
|
for (count = 0; !alarm && count < max; count++)
|
||||||
{
|
{
|
||||||
currentAlarm = [alarms objectAtIndex: count];
|
currentAlarm = [alarms objectAtIndex: count];
|
||||||
action = [[currentAlarm action] lowercaseString];
|
|
||||||
if (!action || [action isEqualToString: @"display"])
|
// Only handle 'display' alarms
|
||||||
ASSIGN (alarm, currentAlarm);
|
action = [currentAlarm action];
|
||||||
|
if ([action caseInsensitiveCompare: @"display"] != NSOrderedSame)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Ignore alarms already triggered
|
||||||
|
webstatus = [[currentAlarm trigger] value: 0 ofAttribute: @"x-webstatus"];
|
||||||
|
if ([webstatus caseInsensitiveCompare: @"triggered"] == NSOrderedSame)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ASSIGN (alarm, currentAlarm);
|
||||||
}
|
}
|
||||||
|
|
||||||
alarmSet = YES;
|
alarmSet = YES;
|
||||||
|
|||||||
Reference in New Issue
Block a user