mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
Added change PIN code feature from the settings
This commit is contained in:
@@ -71,6 +71,7 @@ enum {
|
||||
enum {
|
||||
PIN_CODE_SETTING,
|
||||
PIN_CODE_DESCRIPTION,
|
||||
PIN_CODE_CHANGE,
|
||||
PIN_CODE_BIOMETRICS,
|
||||
PIN_CODE_COUNT
|
||||
};
|
||||
@@ -315,7 +316,10 @@ TableViewSectionsDelegate>
|
||||
// Rows
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_SETTING];
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_DESCRIPTION];
|
||||
|
||||
if ([PinCodePreferences shared].isPinSet) {
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_CHANGE];
|
||||
}
|
||||
|
||||
if ([PinCodePreferences shared].isBiometricsAvailable)
|
||||
{
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_BIOMETRICS];
|
||||
@@ -1293,6 +1297,10 @@ TableViewSectionsDelegate>
|
||||
cell = [self descriptionCellForTableView:tableView withText:nil];
|
||||
}
|
||||
}
|
||||
else if (indexPath.row == PIN_CODE_CHANGE)
|
||||
{
|
||||
cell = [self buttonCellWithTitle:NSLocalizedStringFromTable(@"pin_protection_settings_change_pin", @"Vector", nil) action:@selector(changePinCode: ) forTableView:tableView atIndexPath:indexPath];
|
||||
}
|
||||
else if (indexPath.row == PIN_CODE_BIOMETRICS)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *switchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
@@ -1708,6 +1716,14 @@ TableViewSectionsDelegate>
|
||||
[self.setPinCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
|
||||
- (void)changePinCode:(UIButton *)sender
|
||||
{
|
||||
SetPinCoordinatorViewMode viewMode = SetPinCoordinatorViewModeChangePin;
|
||||
self.setPinCoordinatorBridgePresenter = [[SetPinCoordinatorBridgePresenter alloc] initWithSession:self.mainSession viewMode:viewMode];
|
||||
self.setPinCoordinatorBridgePresenter.delegate = self;
|
||||
[self.setPinCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - SettingsKeyBackupTableViewSectionDelegate
|
||||
#ifdef CROSS_SIGNING_AND_BACKUP_DEV
|
||||
- (void)settingsKeyBackupTableViewSectionDidUpdate:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection
|
||||
|
||||
Reference in New Issue
Block a user