Monotone-Parent: f617866a91a29b390f0a2207ceb975bf2b2eeaa3

Monotone-Revision: e862ec9df7a40d9361fca6b959f96c844ff74060

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-11-26T19:34:56
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-11-26 19:34:56 +00:00
parent 5a31a100c6
commit 126b92fb1e
2 changed files with 21 additions and 11 deletions
+4
View File
@@ -1,5 +1,9 @@
2009-11-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserDefaults.m (-synchronize): avoid fetching
the values from the database/the cache when they are successfully
stored.
* SoObjects/SOGo/SOGoCache.m (_cacheValues:ofType:forLogin:): we
also fill the local cache with the new value to avoid ignoring it
next time the cache is invoked.
+17 -11
View File
@@ -465,25 +465,31 @@ static NSString *uidColumnName = @"c_uid";
- (BOOL) synchronize
{
BOOL rc;
// if (!defFlags.modified) /* was not modified */
// return YES;
rc = NO;
/* ensure fetched data (more or less guaranteed by modified!=0) */
[self fetchProfile];
if (!values)
return NO;
/* store */
if (![self primaryStoreProfile])
if (values)
{
[self primaryFetchProfile];
return NO;
/* store */
if ([self primaryStoreProfile])
{
rc = YES;
// /* refetch */
// [self primaryFetchProfile];
}
else
{
[self primaryFetchProfile];
return NO;
}
}
/* refetch */
[self primaryFetchProfile];
return YES;
return rc;
}
/* typed accessors */