mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge commit '421d2bcd9c709481b3573ed2d0de4e6a417844b3'
This commit is contained in:
commit
e31f0f0cca
@ -238,7 +238,7 @@ public func searchMessages(account: Account, location: SearchMessagesLocation, q
|
||||
} else {
|
||||
let lowerBound = state?.main.messages.last.flatMap({ $0.index })
|
||||
let signal: Signal<Api.messages.Messages, MTRpcError>
|
||||
if peer.id.namespace == Namespaces.Peer.CloudChannel && tags == nil && minDate == nil && maxDate == nil {
|
||||
if peer.id.namespace == Namespaces.Peer.CloudChannel && tags == nil && minDate == nil && maxDate == nil && query.isEmpty {
|
||||
signal = account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: lowerBound?.id.id ?? 0, offsetDate: 0, addOffset: 0, limit: limit, maxId: Int32.max - 1, minId: 0, hash: 0))
|
||||
} else {
|
||||
signal = account.network.request(Api.functions.messages.search(flags: flags, peer: inputPeer, q: query, fromId: fromInputUser, topMsgId: topMsgId?.id, filter: filter, minDate: minDate ?? 0, maxDate: maxDate ?? (Int32.max - 1), offsetId: lowerBound?.id.id ?? 0, addOffset: 0, limit: limit, maxId: Int32.max - 1, minId: 0, hash: 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user