fix(calendar): Fix MacOS X Ventura calendar support. Fixes #5639

This commit is contained in:
smizrahi
2023-08-22 18:11:53 +02:00
parent 1c93796ae1
commit 4f7c73143f
8 changed files with 14 additions and 55 deletions
+2 -22
View File
@@ -150,7 +150,7 @@ static NSArray *childRecordFields = nil;
if ([pathElements count] > 1)
ocsName = [pathElements objectAtIndex: 1];
else
ocsName = [[context request] isMacOSXFromVenturaCalendarApp] ? @"Personal" : @"personal";
ocsName = @"personal";
path = [NSString stringWithFormat: @"/Users/%@/%@/%@",
login, [pathElements objectAtIndex: 0], ocsName];
@@ -400,14 +400,7 @@ static NSArray *childRecordFields = nil;
}
- (void) setOCSPath: (NSString *) _path
{
// FIXME: Improve MacOSX Ventura support
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
// Ticket #5639
if ([[context request] isMacOSXFromVenturaCalendarApp]) {
_path = [_path stringByReplacingOccurrencesOfString:@"/PERSONAL" withString:@"/personal"];
}
{
if (![ocsPath isEqualToString:_path])
{
if (ocsPath)
@@ -438,12 +431,6 @@ static NSArray *childRecordFields = nil;
cache = [SOGoCache sharedCache];
record = [[cache valueForKey: _path] objectFromJSONString];
// FIXME: Improve MacOSX Ventura support
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
// Ticket #5639
if ([[context request] isMacOSXFromVenturaCalendarApp]) {
_path = [_path stringByReplacingOccurrencesOfString:@"PERSONAL" withString:@"personal"];
}
// We check if we got a cache miss or a potentially bogus
// entry from the cache
@@ -471,13 +458,6 @@ static NSArray *childRecordFields = nil;
realNameInContainer = [self realNameInContainer];
// FIXME: Improve MacOSX Ventura support
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
// Ticket #5639
if ([[context request] isMacOSXFromVenturaCalendarApp]) {
realNameInContainer = [realNameInContainer stringByReplacingOccurrencesOfString:@"PERSONAL" withString:@"personal"];
}
return [NSString stringWithFormat: @"%@:%@/%@",
owner,
[container nameInContainer],