activeTasks updates dynamically

This commit is contained in:
Alexandre Cloutier
2014-06-27 17:00:32 -04:00
parent 659e2f3aa8
commit 5b61df8ca4
3 changed files with 205 additions and 151 deletions
+23 -1
View File
@@ -480,7 +480,7 @@ static NSArray *tasksFields = nil;
return infos;
}
- (WOResponse *) _responseWithData: (NSArray *) data
- (WOResponse *) _responseWithData: (id) data
{
WOResponse *response;
@@ -1208,4 +1208,26 @@ _computeBlocksPosition (NSArray *blocks)
return [self _responseWithData: filteredTasks];
}
- (WOResponse *) activeTasksAction
{
SOGoAppointmentFolders *co;
SOGoAppointmentFolder *folder;
NSArray *folders;
NSNumber *tasksCount, *foldersCount;
NSString *calendarID;
NSMutableDictionary *activeTasksByCalendars;
co = [self clientObject];
folders = [co subFolders];
foldersCount = [folders count];
activeTasksByCalendars = [NSMutableDictionary dictionaryWithCapacity:foldersCount];
for (folder in folders) {
tasksCount = [folder activeTasks];
calendarID = [folder nameInContainer];
[activeTasksByCalendars setObject:tasksCount forKey:calendarID];
}
return [self _responseWithData: activeTasksByCalendars];
}
@end