Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roundhill authored Sep 24, 2018
2 parents ecc42a2 + ce7d1fc commit 62ff242
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions External/DTPinLock/DTPinLockController.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ - (void)displayTouchIDIfAppropriate
dispatch_async(dispatch_get_main_queue(), ^{
[self dismissKeyboard];
[self didFinishUnlocking];
self.biometryUnlockWasSuccessful = YES;
});
}

Expand Down
23 changes: 23 additions & 0 deletions Simplenote/Classes/SPOptionsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,28 @@ - (void)viewDidLoad
self.pinTimeoutTextField.inputAccessoryView = self.doneToolbar;
[self.view addSubview:self.pinTimeoutTextField];

self.pinTimeoutPickerView = [UIPickerView new];
self.pinTimeoutPickerView.delegate = self;
self.pinTimeoutPickerView.dataSource = self;
[self.pinTimeoutPickerView selectRow:[[NSUserDefaults standardUserDefaults] integerForKey:kPinTimeoutPreferencesKey] inComponent:0 animated:NO];

self.doneToolbar = [UIToolbar new];
self.doneToolbar.barStyle = UIBarStyleDefault;
self.doneToolbar.translucent = NO;
[self.doneToolbar sizeToFit];

UIBarButtonItem *doneButtonItem = [[UIBarButtonItem alloc] initWithTitle: NSLocalizedString(@"Done", @"Done toolbar button") style:UIBarButtonItemStylePlain target:self action:@selector(pinTimeoutDoneAction:)];
UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];

fixedSpace.width = self.doneToolbar.frame.size.width;
[self.doneToolbar setItems:[NSArray arrayWithObjects:fixedSpace, doneButtonItem, nil]];

self.pinTimeoutTextField = [UITextField new];
self.pinTimeoutTextField.frame = CGRectMake(0, 0, 0, 0);
self.pinTimeoutTextField.inputView = self.pinTimeoutPickerView;
self.pinTimeoutTextField.inputAccessoryView = self.doneToolbar;
[self.view addSubview:self.pinTimeoutTextField];

// Listen to Theme Notifications
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(themeDidChange)
Expand Down Expand Up @@ -735,6 +757,7 @@ - (BOOL)themePref
}



#pragma mark - Picker view delegate
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 1;
Expand Down
5 changes: 5 additions & 0 deletions Simplenote/SPAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ - (void)applicationWillResignActive:(UIApplication *)application

// Save any pending changes
[self.noteEditorViewController save];

// For the passcode lock, store the current clock time for comparison when returning to the app
if ([self passcodeLockIsEnabled]) {
[SPPinLockManager storeLastUsedTime];
}
}

- (void)applicationWillTerminate:(UIApplication *)application
Expand Down

0 comments on commit 62ff242

Please sign in to comment.