From 74ed2d15e0775fad13f40ec4ce4ba741d2124afb Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 11 Nov 2008 23:03:46 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 467ec5f1f0997ec12a4adbf6bc501ee81735cbdb Monotone-Revision: 9641487ae73aa57f2e0f1a17a9b0f485143a6423 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2008-11-11T23:03:46 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/SOGo/SOGoCache.m | 10 +++++++--- SoObjects/SOGo/SOGoUser.m | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3a48e777..04a292b8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-11 Ludovic Marcotte + + * Fixed a couple of issues in the new pref caching + subsystem. + 2008-10-29 Francis Lachapelle * SoObjects/SOGo/SOGoUser.m ([-userDefaults]): added support for diff --git a/SoObjects/SOGo/SOGoCache.m b/SoObjects/SOGo/SOGoCache.m index 33f076967..a091130cd 100644 --- a/SoObjects/SOGo/SOGoCache.m +++ b/SoObjects/SOGo/SOGoCache.m @@ -208,10 +208,12 @@ static SOGoCache *sharedCache = nil; d = [[NSMutableDictionary alloc] init]; [d addEntriesFromDictionary: [theNotification userInfo]]; - user = [d objectForKey: @"uid"]; + user = [d objectForKey: @"uid"]; + [user retain]; [d removeObjectForKey: @"uid"]; [SOGoUser setUserDefaultsFromDictionary: d user: user]; + [user release]; [d release]; } @@ -223,10 +225,12 @@ static SOGoCache *sharedCache = nil; d = [[NSMutableDictionary alloc] init]; [d addEntriesFromDictionary: [theNotification userInfo]]; - user = [d objectForKey: @"uid"]; + user = [d objectForKey: @"uid"]; + [user retain]; [d removeObjectForKey: @"uid"]; [SOGoUser setUserSettingsFromDictionary: d user: user]; + [user release]; [d release]; } @@ -267,7 +271,7 @@ static SOGoCache *sharedCache = nil; if ([now earlierDate: [currentEntry objectForKey: @"cleanupDate"]] == now) { - [SOGoUser setUserDefaultsFromDictionary: nil user: currentID]; + [SOGoUser setUserSettingsFromDictionary: nil user: currentID]; count++; } } diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 2b6784b63..1e0f0376a 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -541,7 +541,7 @@ _timeValue (NSString *key) + (NSDictionary *) userSettingsCache { - return userDefaults; + return userSettings; } - (NSUserDefaults *) userSettings