mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Topic improvements
This commit is contained in:
@@ -485,7 +485,13 @@ enum LoadMessageHistoryThreadsError {
|
||||
|
||||
func _internal_requestMessageHistoryThreads(accountPeerId: PeerId, postbox: Postbox, network: Network, peerId: PeerId, offsetIndex: StoredPeerThreadCombinedState.Index?, limit: Int) -> Signal<LoadMessageHistoryThreadsResult, LoadMessageHistoryThreadsError> {
|
||||
let signal: Signal<LoadMessageHistoryThreadsResult, LoadMessageHistoryThreadsError> = postbox.transaction { transaction -> Api.InputChannel? in
|
||||
return transaction.getPeer(peerId).flatMap(apiInputChannel)
|
||||
guard let channel = transaction.getPeer(peerId) as? TelegramChannel else {
|
||||
return nil
|
||||
}
|
||||
if !channel.flags.contains(.isForum) {
|
||||
return nil
|
||||
}
|
||||
return apiInputChannel(channel)
|
||||
}
|
||||
|> castError(LoadMessageHistoryThreadsError.self)
|
||||
|> mapToSignal { inputChannel -> Signal<LoadMessageHistoryThreadsResult, LoadMessageHistoryThreadsError> in
|
||||
|
||||
Reference in New Issue
Block a user