Web app improvements

This commit is contained in:
Ilya Laktyushin
2023-09-01 15:01:36 +04:00
parent f432842f75
commit ea52d6e369
2 changed files with 9 additions and 1 deletions

View File

@@ -1150,7 +1150,14 @@ public final class WebAppController: ViewController, AttachmentContainable {
requiresUnblock = true
}
let alertController = textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_SharePhoneTitle, text: self.presentationData.strings.WebApp_SharePhoneConfirmation(botName).string, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: {
let text: String
if requiresUnblock {
text = self.presentationData.strings.WebApp_SharePhoneConfirmationUnblock(botName).string
} else {
text = self.presentationData.strings.WebApp_SharePhoneConfirmation(botName).string
}
let alertController = textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_SharePhoneTitle, text: text, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: {
sendEvent(false)
}), TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: { [weak self] in
guard let self, case let .user(user) = accountPeer, let phone = user.phone, !phone.isEmpty else {