mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
(fix) small fix for task reminders
This commit is contained in:
@@ -82,7 +82,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
|
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
|
||||||
[trigger setValueType: @"DURATION"];
|
[trigger setValueType: @"DURATION"];
|
||||||
[self setTrigger: trigger];
|
[self setTrigger: trigger];
|
||||||
if (![self action])
|
if (![[self action] length])
|
||||||
[self setAction: @"DISPLAY"];
|
[self setAction: @"DISPLAY"];
|
||||||
|
|
||||||
// SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days)
|
// SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days)
|
||||||
@@ -120,7 +120,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
}
|
}
|
||||||
|
|
||||||
[self setTrigger: trigger];
|
[self setTrigger: trigger];
|
||||||
if (![self action])
|
if (![[self action] length])
|
||||||
[self setAction: @"DISPLAY"];
|
[self setAction: @"DISPLAY"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,10 +102,22 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
if ([self hasAlarms])
|
if ([self hasAlarms])
|
||||||
{
|
{
|
||||||
iCalAlarm *alarm;
|
iCalAlarm *alarm;
|
||||||
|
NSString *webstatus;
|
||||||
|
|
||||||
alarm = [self firstDisplayOrAudioAlarm];
|
if ((alarm = [self firstSupportedAlarm]))
|
||||||
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 1];
|
{
|
||||||
[s appendString: [alarm activeSyncRepresentationInContext: context]];
|
webstatus = [[alarm trigger] value: 0 ofAttribute: @"x-webstatus"];
|
||||||
|
if (!webstatus || ([webstatus caseInsensitiveCompare: @"TRIGGERED"] != NSOrderedSame))
|
||||||
|
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 1];
|
||||||
|
else
|
||||||
|
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
|
||||||
|
|
||||||
|
[s appendString: [alarm activeSyncRepresentationInContext: context]];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user