mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various Improvements
This commit is contained in:
@@ -12,10 +12,6 @@ import AccountContext
|
||||
import UrlEscaping
|
||||
import PassportUI
|
||||
import UrlHandling
|
||||
#if ENABLE_WALLET
|
||||
import WalletUI
|
||||
import WalletUrl
|
||||
#endif
|
||||
import OpenInExternalAppUI
|
||||
|
||||
public struct ParsedSecureIdUrl {
|
||||
@@ -142,18 +138,6 @@ func formattedConfirmationCode(_ code: Int) -> String {
|
||||
}
|
||||
|
||||
func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, url: String, forceExternal: Bool, presentationData: PresentationData, navigationController: NavigationController?, dismissInput: @escaping () -> Void) {
|
||||
#if ENABLE_WALLET
|
||||
if url.hasPrefix("ton://") {
|
||||
if let url = URL(string: url), let parsedUrl = parseWalletUrl(url) {
|
||||
context.sharedContext.openWallet(context: context, walletContext: .send(address: parsedUrl.address, amount: parsedUrl.amount, comment: parsedUrl.comment)) { c in
|
||||
navigationController?.pushViewController(c)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
#endif
|
||||
|
||||
if forceExternal || url.lowercased().hasPrefix("tel:") || url.lowercased().hasPrefix("calshow:") {
|
||||
context.sharedContext.applicationBindings.openUrl(url)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user