Bug 314345 Events and tasks still seen if all calendars is deselected, r=mvl

This commit is contained in:
jminta%gmail.com 2005-11-07 17:55:05 +00:00
parent 2a7e0f3224
commit 5e7d59a92c

View File

@ -342,6 +342,16 @@ calCompositeCalendar.prototype = {
// in calIDateTime aRangeStart, in calIDateTime aRangeEnd,
// in calIOperationListener aListener );
getItems: function (aItemFilter, aCount, aRangeStart, aRangeEnd, aListener) {
// If there are no calendars, then we just call onOperationComplete
if (this.mCalendars.length == 0) {
aListener.onOperationComplete (this,
Components.results.NS_OK,
calIOperationListener.GET,
null,
null);
return;
}
var cmpListener = new calCompositeGetListenerHelper(this.mCalendars.length, aListener, aCount);
for (cal in this.mCalendars) {
this.mCalendars[cal].getItems (aItemFilter, aCount, aRangeStart, aRangeEnd, cmpListener);