mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-02 18:15:26 +00:00
(fix) Save event to a different calendar
This commit is contained in:
@@ -617,6 +617,8 @@ static NSArray *reminderValues = nil;
|
||||
NSCalendarDate *now;
|
||||
NSMutableDictionary *dataWithOwner;
|
||||
NSString *owner;
|
||||
SOGoAppointmentFolders *folders;
|
||||
id destinationCalendar;
|
||||
|
||||
now = [NSCalendarDate calendarDate];
|
||||
owner = [componentCalendar ownerInContext: context];
|
||||
@@ -626,6 +628,17 @@ static NSArray *reminderValues = nil;
|
||||
[dataWithOwner setObject: owner forKey: @"owner"];
|
||||
[component setAttributes: dataWithOwner inContext: context];
|
||||
|
||||
destinationCalendar = [data objectForKey: @"destinationCalendar"];
|
||||
if ([destinationCalendar isKindOfClass: [NSString class]])
|
||||
{
|
||||
folders = [[context activeUser] calendarsFolderInContext: context];
|
||||
componentCalendar = [folders lookupName: [destinationCalendar stringValue]
|
||||
inContext: context
|
||||
acquire: 0];
|
||||
[componentCalendar retain];
|
||||
|
||||
}
|
||||
|
||||
[self _handleOrganizer];
|
||||
|
||||
if ([[self clientObject] isNew])
|
||||
|
||||
Reference in New Issue
Block a user