mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-23 10:54:06 +00:00
Refactor Api types 150-179 to use struct-wrapped constructors
- Update pattern matches to use struct-based extraction for inputPeer*, inputMedia*, inputReplyTo*, inputSticker*, inputPhoto, inputUser, etc. - Wrap constructor calls with .init() for struct-wrapped enum cases - 47 TelegramCore source files modified - 5 TelegramApi files regenerated with --struct-count=180 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -240,7 +240,8 @@ private func pushPeerReadState(network: Network, postbox: Postbox, stateManager:
|
||||
return inputPeer(postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { inputPeer -> Signal<PeerReadState, PeerReadStateValidationError> in
|
||||
switch inputPeer {
|
||||
case let .inputPeerChannel(channelId, accessHash):
|
||||
case let .inputPeerChannel(inputPeerChannelData):
|
||||
let (channelId, accessHash) = (inputPeerChannelData.channelId, inputPeerChannelData.accessHash)
|
||||
switch readState {
|
||||
case let .idBased(maxIncomingReadId, _, _, _, markedUnread):
|
||||
var pushSignal: Signal<Void, NoError> = network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(.init(channelId: channelId, accessHash: accessHash)), maxId: maxIncomingReadId))
|
||||
|
||||
Reference in New Issue
Block a user