Add missing biometry type. (#2148)

This commit is contained in:
Doug
2023-11-22 13:40:13 +00:00
committed by GitHub
parent d11562692c
commit 0dafdc4e7a
@@ -21,36 +21,28 @@ extension LABiometryType {
/// The SF Symbol that represents the biometry type. /// The SF Symbol that represents the biometry type.
var systemSymbol: SFSymbol { var systemSymbol: SFSymbol {
switch self { switch self {
case .none: case .none: {
MXLog.error("Invalid presentation: Biometrics not supported.") MXLog.error("Invalid presentation: Biometrics not supported.")
return .viewfinder return .viewfinder
case .touchID: }()
return .touchid case .touchID: .touchid
case .faceID: case .faceID: .faceid
return .faceid case .opticID: SFSymbol(rawValue: "opticid")
// Requires Xcode 15: @unknown default: .viewfinder
// case .opticID:
// .opticid
@unknown default:
return .viewfinder
} }
} }
/// The localized string for the biometry type. /// The localized string for the biometry type.
var localizedString: String { var localizedString: String {
switch self { switch self {
case .none: case .none: {
MXLog.error("Invalid presentation: Biometrics not supported.") MXLog.error("Invalid presentation: Biometrics not supported.")
return L10n.screenAppLockBiometricUnlock return L10n.screenAppLockBiometricUnlock
case .touchID: }()
return L10n.commonTouchIdIos case .touchID: L10n.commonTouchIdIos
case .faceID: case .faceID: L10n.commonFaceIdIos
return L10n.commonFaceIdIos case .opticID: L10n.commonOpticIdIos
// Requires Xcode 15: @unknown default: L10n.screenAppLockBiometricUnlock
// case .opticID:
// L10n.commonOpticIdIos
@unknown default:
return L10n.screenAppLockBiometricUnlock
} }
} }
} }