mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Limit history fetches to 100 messages
This commit is contained in:
parent
5faa143d6f
commit
6171761401
@ -121,7 +121,9 @@ func withResolvedAssociatedMessages(postbox: Postbox, source: FetchMessageHistor
|
|||||||
|> switchToLatest
|
|> switchToLatest
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchMessageHistoryHole(accountPeerId: PeerId, source: FetchMessageHistoryHoleSource, postbox: Postbox, peerId: PeerId, namespace: MessageId.Namespace, direction: MessageHistoryViewRelativeHoleDirection, space: MessageHistoryHoleSpace, count: Int) -> Signal<Never, NoError> {
|
func fetchMessageHistoryHole(accountPeerId: PeerId, source: FetchMessageHistoryHoleSource, postbox: Postbox, peerId: PeerId, namespace: MessageId.Namespace, direction: MessageHistoryViewRelativeHoleDirection, space: MessageHistoryHoleSpace, count rawCount: Int) -> Signal<Never, NoError> {
|
||||||
|
let count = min(100, rawCount)
|
||||||
|
|
||||||
return postbox.stateView()
|
return postbox.stateView()
|
||||||
|> mapToSignal { view -> Signal<AuthorizedAccountState, NoError> in
|
|> mapToSignal { view -> Signal<AuthorizedAccountState, NoError> in
|
||||||
if let state = view.state as? AuthorizedAccountState {
|
if let state = view.state as? AuthorizedAccountState {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user