mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user