Commit faa0c470 authored by Gleb Pinigin's avatar Gleb Pinigin

Use boolValue instead of intValue for settings options

parent ad66f769
......@@ -139,7 +139,7 @@
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *passcode = [defaults objectForKey:kVLCSettingPasscodeKey];
if ([passcode isEqualToString:@""] || ![[defaults objectForKey:kVLCSettingPasscodeOnKey] intValue]) {
if ([passcode isEqualToString:@""] || ![[defaults objectForKey:kVLCSettingPasscodeOnKey] boolValue]) {
self.passcodeValidated = YES;
return;
}
......
......@@ -83,8 +83,8 @@
- (void)viewWillAppear:(BOOL)animated
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *options = @[[[defaults objectForKey:kVLCSettingVerboseOutput] intValue] ? kVLCSettingVerboseOutputOnValue : kVLCSettingVerboseOutputOffValue,
[[defaults objectForKey:kVLCSettingStretchAudio] intValue] ? kVLCSettingStretchAudioOnValue : kVLCSettingStretchAudioOffValue,
NSArray *options = @[[[defaults objectForKey:kVLCSettingVerboseOutput] boolValue] ? kVLCSettingVerboseOutputOnValue : kVLCSettingVerboseOutputOffValue,
[[defaults objectForKey:kVLCSettingStretchAudio] boolValue] ? kVLCSettingStretchAudioOnValue : kVLCSettingStretchAudioOffValue,
[NSString stringWithFormat:@"--subsdec-encoding=%@",[defaults objectForKey:kVLCSettingTextEncoding]]];
_mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options];
......
......@@ -31,7 +31,7 @@
- (void)settingDidChange:(NSNotification*)notification
{
if ([notification.object isEqual:kVLCSettingPasscodeOnKey]) {
BOOL passcodeOn = (BOOL)[[notification.userInfo objectForKey:kVLCSettingPasscodeOnKey] intValue];
BOOL passcodeOn = [[notification.userInfo objectForKey:kVLCSettingPasscodeOnKey] boolValue];
if (passcodeOn) {
PAPasscodeViewController *passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionSet];
......
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