Commit af2b1036 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

save defaults when changing them

parent 952f8d77
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
NSUserDefaults *defaults; NSUserDefaults *defaults;
[defaults setObject:@1 forKey:@"PasscodeProtection"]; [defaults setObject:@1 forKey:@"PasscodeProtection"];
[defaults setObject:_tmpPasscode forKey:@"Passcode"]; [defaults setObject:_tmpPasscode forKey:@"Passcode"];
[defaults synchronize];
_passcode = _tmpPasscode; _passcode = _tmpPasscode;
_resetStage = 0; _resetStage = 0;
appDelegate.playlistViewController.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:300]; // five min appDelegate.playlistViewController.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:300]; // five min
......
...@@ -46,8 +46,11 @@ ...@@ -46,8 +46,11 @@
} }
[self.view addSubview:appDelegate.playlistViewController.passcodeLockViewController.view]; [self.view addSubview:appDelegate.playlistViewController.passcodeLockViewController.view];
[appDelegate.playlistViewController.passcodeLockViewController resetPasscode]; [appDelegate.playlistViewController.passcodeLockViewController resetPasscode];
} else } else {
[[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"PasscodeProtection"]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:@0 forKey:@"PasscodeProtection"];
[defaults synchronize];
}
} }
- (IBAction)dismiss:(id)sender - (IBAction)dismiss:(id)sender
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment