Skip to content

Commit

Permalink
Fix #4461 - "PIN & (NULL)" when device biometrics not available (or n…
Browse files Browse the repository at this point in the history
…ot enrolled).
  • Loading branch information
stefanceriu committed Sep 21, 2021
1 parent d9e7902 commit f9ec121
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Riot/Modules/Settings/Security/SecurityViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,12 @@ - (void)updateSections
Section *pinCodeSection = [Section sectionWithTag:SECTION_PIN_CODE];

// Header title
NSString *pinCodeSectionHeaderTitleFormat = NSLocalizedStringFromTable(@"pin_protection_settings_section_header_x", @"Vector", nil);
NSString *pinCodeSectionHeaderTitle = [NSString stringWithFormat:pinCodeSectionHeaderTitleFormat, [PinCodePreferences shared].localizedBiometricsName];
pinCodeSection.headerTitle = pinCodeSectionHeaderTitle;
if ([PinCodePreferences shared].isBiometricsAvailable)
{
NSString *pinCodeSectionHeaderTitleFormat = NSLocalizedStringFromTable(@"pin_protection_settings_section_header_x", @"Vector", nil);
NSString *pinCodeSectionHeaderTitle = [NSString stringWithFormat:pinCodeSectionHeaderTitleFormat, [PinCodePreferences shared].localizedBiometricsName];
pinCodeSection.headerTitle = pinCodeSectionHeaderTitle;
}

// Rows
[pinCodeSection addRowWithTag:PIN_CODE_SETTING];
Expand Down

0 comments on commit f9ec121

Please sign in to comment.