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

save defaults when changing them

parent 952f8d77
......@@ -61,6 +61,7 @@
NSUserDefaults *defaults;
[defaults setObject:@1 forKey:@"PasscodeProtection"];
[defaults setObject:_tmpPasscode forKey:@"Passcode"];
[defaults synchronize];
_passcode = _tmpPasscode;
_resetStage = 0;
appDelegate.playlistViewController.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:300]; // five min
......
......@@ -46,8 +46,11 @@
}
[self.view addSubview:appDelegate.playlistViewController.passcodeLockViewController.view];
[appDelegate.playlistViewController.passcodeLockViewController resetPasscode];
} else
[[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"PasscodeProtection"];
} else {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:@0 forKey:@"PasscodeProtection"];
[defaults synchronize];
}
}
- (IBAction)dismiss:(id)sender
......
Markdown is supported
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