Fix #4461 - "PIN & (NULL)" when device biometrics not available (or not enrolled).

This commit is contained in:
Stefan Ceriu
2021-09-21 13:56:50 +03:00
committed by Stefan Ceriu
parent b4d51ab4ba
commit a37d7831a1

View File

@@ -292,9 +292,12 @@ TableViewSectionsDelegate>
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];