#import <SOGo/NSCalendarDate+SOGo.h>
#import <SOGoUI/UIxComponent.h>
-static NSString *defaultModule;
+static NSString *defaultModule = nil;
@interface SOGoUserHomePage : UIxComponent
{
NSUserDefaults *ud;
- ud = [NSUserDefaults standardUserDefaults];
- defaultModule = [ud stringForKey: @"SOGoUIxDefaultModule"];
- if (defaultModule)
+ if (!defaultModule)
{
+ ud = [NSUserDefaults standardUserDefaults];
+ defaultModule = [ud stringForKey: @"SOGoUIxDefaultModule"];
if (defaultModule)
{
if (!([defaultModule isEqualToString: @"Calendar"]
@"'Calendar', 'Contacts' or Mail)", defaultModule];
defaultModule = @"Calendar";
}
+ else
+ defaultModule = @"Calendar";
}
else
defaultModule = @"Calendar";
-
[self logWithFormat: @"default module set to '%@'", defaultModule];
[defaultModule retain];
}
workweek = from -> to
identities */
+static BOOL defaultsRead = NO;
static BOOL shouldDisplayPasswordChange = NO;
@implementation UIxPreferences
{
NSUserDefaults *ud;
- ud = [NSUserDefaults standardUserDefaults];
- shouldDisplayPasswordChange
- = [ud boolForKey: @"SOGoUIxUserCanChangePassword"];
+ if (!defaultsRead)
+ {
+ ud = [NSUserDefaults standardUserDefaults];
+ shouldDisplayPasswordChange
+ = [ud boolForKey: @"SOGoUIxUserCanChangePassword"];
+ defaultsRead = YES;
+ }
}
- (id) init