(fix) improved the handling of default calendar categories/colors (#3200)

This commit is contained in:
Ludovic Marcotte
2015-06-09 20:30:22 -04:00
parent 76360958a2
commit a56dbeb6a9
8 changed files with 16 additions and 25 deletions
-11
View File
@@ -128,7 +128,6 @@ static NSArray *reminderValues = nil;
calendarCategories = nil;
calendarCategoriesColors = nil;
defaultCategoryColor = nil;
category = nil;
label = nil;
@@ -175,7 +174,6 @@ static NSArray *reminderValues = nil;
[vacationOptions release];
[calendarCategories release];
[calendarCategoriesColors release];
[defaultCategoryColor release];
[category release];
[label release];
[mailLabels release];
@@ -1521,15 +1519,6 @@ static NSArray *reminderValues = nil;
ASSIGN (calendarCategoriesColors, [userDefaults calendarCategoriesColors]);
categoryColor = [calendarCategoriesColors objectForKey: category];
if (!categoryColor)
{
if (!defaultCategoryColor)
{
dd = [[context activeUser] domainDefaults];
ASSIGN (defaultCategoryColor, [dd calendarDefaultCategoryColor]);
}
categoryColor = defaultCategoryColor;
}
return categoryColor;
}