mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-17 21:03:16 +00:00
Preferences saving support
This commit is contained in:
committed by
Francis Lachapelle
parent
2edfd1863b
commit
96d2a4cea8
@@ -58,14 +58,6 @@
|
||||
|
||||
#import "UIxPreferences.h"
|
||||
|
||||
#warning this class is not finished
|
||||
/* remaining:
|
||||
default event length
|
||||
default snooze length
|
||||
refresh calendar every X minutes
|
||||
workweek = from -> to
|
||||
identities */
|
||||
|
||||
static NSArray *reminderItems = nil;
|
||||
static NSArray *reminderValues = nil;
|
||||
|
||||
@@ -1889,7 +1881,24 @@ static NSArray *reminderValues = nil;
|
||||
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
//return [self responseWithStatus: 200 andJSONRepresentation: data];
|
||||
SOGoUser *user;
|
||||
id o, v;
|
||||
|
||||
o = [[[context request] contentAsString] objectFromJSONString];
|
||||
user = [[self context] activeUser];
|
||||
|
||||
if ((v = [o objectForKey: @"defaults"]))
|
||||
{
|
||||
[[[user userDefaults] source] setValues: v];
|
||||
[[user userDefaults] synchronize];
|
||||
}
|
||||
|
||||
if ((v = [o objectForKey: @"settings"]))
|
||||
{
|
||||
[[[user userSettings] source] setValues: v];
|
||||
[[user userSettings] synchronize];
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 200];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user