mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Web app improvements
This commit is contained in:
parent
f432842f75
commit
ea52d6e369
2 changed files with 9 additions and 1 deletions
|
|
@ -9900,3 +9900,4 @@ Sorry for the inconvenience.";
|
|||
|
||||
"WebApp.SharePhoneTitle" = "Share Phone Number?";
|
||||
"WebApp.SharePhoneConfirmation" = "**%@** will know your phone number. This can be useful for integration with other services.";
|
||||
"WebApp.SharePhoneConfirmationUnblock" = "**%@** will know your phone number. This can be useful for integration with other services.\n\nThe bot will also be unblocked.";
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue