mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Pinned messages [WIP]
This commit is contained in:
parent
a62ab933bd
commit
805152ea1e
@ -1138,6 +1138,7 @@ private func finalStateWithUpdatesAndServerTime(postbox: Postbox, network: Netwo
|
||||
updatedState.updateMessagesPinned(ids: messages.map { id in
|
||||
MessageId(peerId: channelPeerId, namespace: Namespaces.Message.Cloud, id: id)
|
||||
}, pinned: (flags & (1 << 0)) != 0)
|
||||
updatedState.updateChannelState(peerId, pts: pts)
|
||||
} else {
|
||||
if !channelsToPoll.contains(peerId) {
|
||||
Logger.shared.log("State", "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramChannel)?.title ?? "nil")) pinned messages pts hole")
|
||||
|
@ -268,6 +268,8 @@ extension Api.Update {
|
||||
}
|
||||
case let .updateDeleteChannelMessages(channelId, _, _, _):
|
||||
return [PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)]
|
||||
case let .updatePinnedChannelMessages(_, channelId, _, _, _):
|
||||
return [PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)]
|
||||
case let .updateNewChannelMessage(message, _, _):
|
||||
return apiMessagePeerIds(message)
|
||||
case let .updateEditChannelMessage(message, _, _):
|
||||
|
@ -3438,7 +3438,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
if message == nil {
|
||||
matches = true
|
||||
} else if let topVisibleMessageRange = topVisibleMessageRange {
|
||||
if entry.message.id < topVisibleMessageRange.upperBound {
|
||||
if entry.message.id < topVisibleMessageRange.lowerBound {
|
||||
matches = true
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user