diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift index c5343465c1..0ca8c13cf7 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift @@ -752,7 +752,7 @@ func _internal_fetchChannelReplyThreadMessage(account: Account, messageId: Messa channelMessageId: nil, isChannelPost: false, isForumPost: true, - isMonoforumPost: false, + isMonoforumPost: peer.isMonoForum, maxMessage: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxKnownMessageId), maxReadIncomingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxIncomingReadId), maxReadOutgoingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxOutgoingReadId), diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 7008eada43..c7508ec3d9 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -8558,7 +8558,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G self?.playShakeAnimation() } } else if let navigationController = strongSelf.effectiveNavigationController { - if case let .channel(channel) = peerId, channel.isForumOrMonoForum { + if case let .channel(channel) = peerId, channel.isForum, !channel.displayForumAsTabs { strongSelf.context.sharedContext.navigateToForumChannel(context: strongSelf.context, peerId: peerId.id, navigationController: navigationController) } else { strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peerId), subject: subject, updateTextInputState: !peerId.id.isGroupOrChannel ? textInputState : nil, keepStack: .always, peekData: peekData)) diff --git a/submodules/TelegramUI/Sources/ChatControllerContentData.swift b/submodules/TelegramUI/Sources/ChatControllerContentData.swift index 039f2728dd..ccfc57c342 100644 --- a/submodules/TelegramUI/Sources/ChatControllerContentData.swift +++ b/submodules/TelegramUI/Sources/ChatControllerContentData.swift @@ -928,6 +928,10 @@ extension ChatControllerImpl { explicitelyCanPinMessages = true } + #if DEBUG + peerMonoforumId = nil + #endif + let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId { strongSelf.preloadHistoryPeerId = preloadHistoryPeerId @@ -1621,6 +1625,10 @@ extension ChatControllerImpl { explicitelyCanPinMessages = true } + #if DEBUG + peerMonoforumId = nil + #endif + let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId { strongSelf.preloadHistoryPeerId = preloadHistoryPeerId