mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-14 21:04:53 +00:00
display the number of active tasks in calendar view
This commit is contained in:
@@ -522,7 +522,6 @@ static iCalEvent *iCalEventK = nil;
|
||||
{
|
||||
/* this is used for group calendars (this folder just returns itself) */
|
||||
NSString *s;
|
||||
|
||||
s = [[self container] nameInContainer];
|
||||
// [self logWithFormat:@"CAL UID: %@", s];
|
||||
return [s isNotNull] ? [NSArray arrayWithObjects:&s count:1] : nil;
|
||||
@@ -3270,4 +3269,25 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
return users;
|
||||
}
|
||||
|
||||
- (NSString *) activeTasks
|
||||
{
|
||||
NSArray *tasksList;
|
||||
NSString *activeTasks;
|
||||
NSMutableArray *fields;
|
||||
|
||||
fields = [NSMutableArray arrayWithObjects: @"c_component", @"c_status", nil];
|
||||
|
||||
tasksList = [self bareFetchFields: fields
|
||||
from: nil
|
||||
to: nil
|
||||
title: nil
|
||||
component: @"vtodo"
|
||||
additionalFilters: @"c_status != 2 AND c_status != 3"];
|
||||
|
||||
activeTasks = [NSString stringWithFormat:@"(%d)", [tasksList count]];
|
||||
|
||||
return activeTasks;
|
||||
}
|
||||
|
||||
|
||||
@end /* SOGoAppointmentFolder */
|
||||
|
||||
Reference in New Issue
Block a user