From 3e0910d17529f9bf0749b4d31745da4facd2fad6 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Mar 2019 10:52:04 -0500 Subject: [PATCH] (web) Keep unlocalized/custom calendar categories --- UI/PreferencesUI/UIxJSONPreferences.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/UI/PreferencesUI/UIxJSONPreferences.m b/UI/PreferencesUI/UIxJSONPreferences.m index d131d672a..337c2106e 100644 --- a/UI/PreferencesUI/UIxJSONPreferences.m +++ b/UI/PreferencesUI/UIxJSONPreferences.m @@ -186,10 +186,11 @@ static SoProduct *preferencesProduct = nil; for (count = 0; count < max; count++) { label = [defaultCalendarCategories objectAtIndex: count]; - if ((localizedLabel = [categoryLabels objectForKey: label])) + if (!(localizedLabel = [categoryLabels objectForKey: label])) { - [filteredCalendarCategories addObject: localizedLabel]; + localizedLabel = label; } + [filteredCalendarCategories addObject: localizedLabel]; } [defaults setCalendarCategories: filteredCalendarCategories]; @@ -224,11 +225,12 @@ static SoProduct *preferencesProduct = nil; for (count = 0; count < max; count++) { label = [defaultCalendarCategories objectAtIndex: count]; - if ((localizedLabel = [categoryLabels objectForKey: label])) + if (!(localizedLabel = [categoryLabels objectForKey: label])) { - [filteredCalendarCategoriesColors setObject: [defaultCalendarCategoriesColors objectForKey: label] - forKey: localizedLabel]; + localizedLabel = label; } + [filteredCalendarCategoriesColors setObject: [defaultCalendarCategoriesColors objectForKey: label] + forKey: localizedLabel]; } [defaults setCalendarCategoriesColors: filteredCalendarCategoriesColors];