fix(core): don't synchronize defaults if no mail identity is created

Fixes #5070
This commit is contained in:
Francis Lachapelle
2020-07-16 13:50:07 -04:00
parent cc19970066
commit e6e994ba80
+2 -1
View File
@@ -134,6 +134,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
email = [self stringForKey: @"SOGoMailCustomEmail"];
replyTo = [self stringForKey: @"SOGoMailReplyTo"];
signature = [self stringForKey: @"SOGoMailSignature"];
rc = NO;
if ([fullName length])
[identity setObject: fullName forKey: @"fullName"];
@@ -148,6 +149,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
{
[identity setObject: [NSNumber numberWithBool: YES] forKey: @"isDefault"];
[self setMailIdentities: [NSArray arrayWithObject: identity]];
rc = YES;
}
/**
@@ -162,7 +164,6 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
if (signature)
[self removeObjectForKey: @"SOGoMailSignature"];
*/
rc = YES;
}
return rc;