This commit is contained in:
Isaac
2025-10-28 16:56:08 +04:00
parent aa59524a09
commit 70702914b4
8 changed files with 202 additions and 32 deletions

View File

@@ -2803,7 +2803,7 @@ public class ChatSendStarsScreen: ViewControllerComponentContainer {
}
}
public static func initialData(context: AccountContext, peerId: EnginePeer.Id, reactSubject: ReactSubject, topPeers: [ReactionsMessageAttribute.TopPeer], completion: @escaping (Int64, TelegramPaidReactionPrivacy, Bool, TransitionOut) -> Void) -> Signal<InitialData?, NoError> {
public static func initialData(context: AccountContext, peerId: EnginePeer.Id, myPeer: EnginePeer? = nil, reactSubject: ReactSubject, topPeers: [ReactionsMessageAttribute.TopPeer], completion: @escaping (Int64, TelegramPaidReactionPrivacy, Bool, TransitionOut) -> Void) -> Signal<InitialData?, NoError> {
let balance: Signal<StarsAmount?, NoError>
if let starsContext = context.starsContext {
balance = starsContext.state
@@ -2875,7 +2875,8 @@ public class ChatSendStarsScreen: ViewControllerComponentContainer {
defaultPrivacyPeer
)
|> map { peerAndTopPeerMap, balance, channelsForPublicReaction, defaultPrivacyPeer -> InitialData? in
let (peer, myPeer, topPeerMap) = peerAndTopPeerMap
let (peer, myPeerValue, topPeerMap) = peerAndTopPeerMap
let myPeer = myPeer ?? myPeerValue
guard let peer, let myPeer else {
return nil
}