Moderation sheet improvements

This commit is contained in:
Isaac
2024-04-19 00:00:04 +04:00
parent b4e1173279
commit 2d65b3d90b
21 changed files with 1183 additions and 241 deletions

View File

@@ -1501,10 +1501,18 @@ public final class WebAppController: ViewController, AttachmentContainable {
var alertTitle: String?
let alertText: String
if let reason {
alertTitle = self.presentationData.strings.WebApp_AlertBiometryAccessText(botPeer.compactDisplayTitle).string
if case .touchId = LocalAuth.biometricAuthentication {
alertTitle = self.presentationData.strings.WebApp_AlertBiometryAccessTouchIDText(botPeer.compactDisplayTitle).string
} else {
alertTitle = self.presentationData.strings.WebApp_AlertBiometryAccessText(botPeer.compactDisplayTitle).string
}
alertText = reason
} else {
alertText = self.presentationData.strings.WebApp_AlertBiometryAccessText(botPeer.compactDisplayTitle).string
if case .touchId = LocalAuth.biometricAuthentication {
alertText = self.presentationData.strings.WebApp_AlertBiometryAccessTouchIDText(botPeer.compactDisplayTitle).string
} else {
alertText = self.presentationData.strings.WebApp_AlertBiometryAccessText(botPeer.compactDisplayTitle).string
}
}
controller.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: self.presentationData), title: alertTitle, text: alertText, actions: [
TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_No, action: {