mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Web app improvements
This commit is contained in:
parent
f432842f75
commit
ea52d6e369
@ -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…
x
Reference in New Issue
Block a user