mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Refactor url handling
This commit is contained in:
@@ -295,6 +295,12 @@ public func deleteAccountOptionsController(context: AccountContext, navigationCo
|
||||
faqUrl = "https://telegram.org/faq#q-can-i-delete-my-messages"
|
||||
}
|
||||
let resolvedUrl = resolveInstantViewUrl(account: context.account, url: faqUrl)
|
||||
|> mapToSignal { result -> Signal<ResolvedUrl, NoError> in
|
||||
guard case let .result(result) = result else {
|
||||
return .complete()
|
||||
}
|
||||
return .single(result)
|
||||
}
|
||||
|
||||
let resolvedUrlPromise = Promise<ResolvedUrl>()
|
||||
resolvedUrlPromise.set(resolvedUrl)
|
||||
@@ -330,6 +336,12 @@ public func deleteAccountOptionsController(context: AccountContext, navigationCo
|
||||
faqUrl = "https://telegram.org/faq#general"
|
||||
}
|
||||
let resolvedUrl = resolveInstantViewUrl(account: context.account, url: faqUrl)
|
||||
|> mapToSignal { result -> Signal<ResolvedUrl, NoError> in
|
||||
guard case let .result(result) = result else {
|
||||
return .complete()
|
||||
}
|
||||
return .single(result)
|
||||
}
|
||||
|
||||
let resolvedUrlPromise = Promise<ResolvedUrl>()
|
||||
resolvedUrlPromise.set(resolvedUrl)
|
||||
|
||||
Reference in New Issue
Block a user