mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
Caldav: implement a new setting to disable task (VTODO) support: davmail.caldavDisableTasks and probably exclude most broken events
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1622 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
854943a28b
commit
75328413c8
@ -2484,9 +2484,18 @@ public abstract class ExchangeSession {
|
||||
dateCondition = gt("dtstart", formatSearchDate(cal.getTime()));
|
||||
}
|
||||
|
||||
return searchEvents(folderPath, or(isNull("instancetype"),
|
||||
boolean caldavDisableTasks = Settings.getBooleanProperty("davmail.caldavDisableTasks");
|
||||
Condition condition;
|
||||
if (caldavDisableTasks) {
|
||||
condition = or(isEqualTo("instancetype", 1),
|
||||
and(isEqualTo("instancetype", 0), dateCondition));
|
||||
} else {
|
||||
condition = or(isNull("instancetype"),
|
||||
isEqualTo("instancetype", 1),
|
||||
and(isEqualTo("instancetype", 0), dateCondition)));
|
||||
and(isEqualTo("instancetype", 0), dateCondition));
|
||||
}
|
||||
|
||||
return searchEvents(folderPath, condition);
|
||||
}
|
||||
|
||||
protected Condition getRangeCondition(String timeRangeStart, String timeRangeEnd) throws IOException {
|
||||
@ -2516,9 +2525,18 @@ public abstract class ExchangeSession {
|
||||
*/
|
||||
public List<Event> searchEvents(String folderPath, String timeRangeStart, String timeRangeEnd) throws IOException {
|
||||
Condition dateCondition = getRangeCondition(timeRangeStart, timeRangeEnd);
|
||||
return searchEvents(folderPath, or(isNull("instancetype"),
|
||||
boolean caldavDisableTasks = Settings.getBooleanProperty("davmail.caldavDisableTasks");
|
||||
Condition condition;
|
||||
if (caldavDisableTasks) {
|
||||
condition = or(isEqualTo("instancetype", 1),
|
||||
and(isEqualTo("instancetype", 0), dateCondition));
|
||||
} else {
|
||||
condition = or(isNull("instancetype"),
|
||||
isEqualTo("instancetype", 1),
|
||||
and(isEqualTo("instancetype", 0), dateCondition)));
|
||||
and(isEqualTo("instancetype", 0), dateCondition));
|
||||
}
|
||||
|
||||
return searchEvents(folderPath, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user