mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-05 19:28:46 +02:00
PresentationDataUtils: drop direct Postbox dependency
The only Postbox usage in Sources/ was a `PeerId?` parameter in the public signature of openUserGeneratedUrl. Switch to the EnginePeer.Id typealias (same type as PeerId, so no call sites break) and remove the Postbox import. Add TelegramCore to BUILD deps since EnginePeer lives there; Postbox was not in BUILD (was transitively supplied). Behavior-preserving. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ef0974de6d
commit
75ec477248
2 changed files with 3 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ swift_library(
|
|||
deps = [
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AlertUI:AlertUI",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Foundation
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import AccountContext
|
||||
import OverlayStatusController
|
||||
import UrlWhitelist
|
||||
|
|
@ -9,7 +9,7 @@ import TelegramPresentationData
|
|||
import AlertComponent
|
||||
import UrlHandling
|
||||
|
||||
public func openUserGeneratedUrl(context: AccountContext, peerId: PeerId?, url: String, concealed: Bool, skipUrlAuth: Bool = false, skipConcealedAlert: Bool = false, forceDark: Bool = false, present: @escaping (ViewController) -> Void, openResolved: @escaping (ResolvedUrl) -> Void, progress: Promise<Bool>? = nil, alertDisplayUpdated: ((ViewController?) -> Void)? = nil) -> Disposable {
|
||||
public func openUserGeneratedUrl(context: AccountContext, peerId: EnginePeer.Id?, url: String, concealed: Bool, skipUrlAuth: Bool = false, skipConcealedAlert: Bool = false, forceDark: Bool = false, present: @escaping (ViewController) -> Void, openResolved: @escaping (ResolvedUrl) -> Void, progress: Promise<Bool>? = nil, alertDisplayUpdated: ((ViewController?) -> Void)? = nil) -> Disposable {
|
||||
var concealed = concealed
|
||||
|
||||
var presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue