Monoforums

This commit is contained in:
Isaac 2025-06-06 21:51:03 +08:00
parent d486f529a3
commit cf8fe78769
3 changed files with 10 additions and 2 deletions

View File

@ -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),

View File

@ -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))

View File

@ -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