mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Web app improvements
This commit is contained in:
parent
ea52d6e369
commit
f850481b2f
@ -9900,4 +9900,4 @@ Sorry for the inconvenience.";
|
|||||||
|
|
||||||
"WebApp.SharePhoneTitle" = "Share Phone Number?";
|
"WebApp.SharePhoneTitle" = "Share Phone Number?";
|
||||||
"WebApp.SharePhoneConfirmation" = "**%@** will know your phone number. This can be useful for integration with other services.";
|
"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.";
|
"WebApp.SharePhoneConfirmationUnblock" = "**%@** will know your phone number. This can be useful for integration with other services.\n\nThis will also unblock the bot.";
|
||||||
|
@ -1104,7 +1104,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
|||||||
if result {
|
if result {
|
||||||
sendEvent(true)
|
sendEvent(true)
|
||||||
} else {
|
} else {
|
||||||
controller.present(textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_AllowWriteTitle, text: self.presentationData.strings.WebApp_AllowWriteConfirmation(controller.botName).string, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: {
|
let alertController = textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_AllowWriteTitle, text: self.presentationData.strings.WebApp_AllowWriteConfirmation(controller.botName).string, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: {
|
||||||
sendEvent(false)
|
sendEvent(false)
|
||||||
}), TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: { [weak self] in
|
}), TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: { [weak self] in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -1115,7 +1115,13 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
|||||||
|> deliverOnMainQueue).start(completed: {
|
|> deliverOnMainQueue).start(completed: {
|
||||||
sendEvent(true)
|
sendEvent(true)
|
||||||
})
|
})
|
||||||
})], parseMarkdown: true), in: .window(.root))
|
})], parseMarkdown: true)
|
||||||
|
alertController.dismissed = { byOutsideTap in
|
||||||
|
if byOutsideTap {
|
||||||
|
sendEvent(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
controller.present(alertController, in: .window(.root))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user