mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-25 20:50:47 +00:00
Monoforums
This commit is contained in:
parent
d486f529a3
commit
cf8fe78769
@ -752,7 +752,7 @@ func _internal_fetchChannelReplyThreadMessage(account: Account, messageId: Messa
|
|||||||
channelMessageId: nil,
|
channelMessageId: nil,
|
||||||
isChannelPost: false,
|
isChannelPost: false,
|
||||||
isForumPost: true,
|
isForumPost: true,
|
||||||
isMonoforumPost: false,
|
isMonoforumPost: peer.isMonoForum,
|
||||||
maxMessage: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxKnownMessageId),
|
maxMessage: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxKnownMessageId),
|
||||||
maxReadIncomingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxIncomingReadId),
|
maxReadIncomingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxIncomingReadId),
|
||||||
maxReadOutgoingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxOutgoingReadId),
|
maxReadOutgoingMessageId: MessageId(peerId: messageId.peerId, namespace: messageId.namespace, id: threadData.maxOutgoingReadId),
|
||||||
|
@ -8558,7 +8558,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
self?.playShakeAnimation()
|
self?.playShakeAnimation()
|
||||||
}
|
}
|
||||||
} else if let navigationController = strongSelf.effectiveNavigationController {
|
} 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)
|
strongSelf.context.sharedContext.navigateToForumChannel(context: strongSelf.context, peerId: peerId.id, navigationController: navigationController)
|
||||||
} else {
|
} 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))
|
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))
|
||||||
|
@ -928,6 +928,10 @@ extension ChatControllerImpl {
|
|||||||
explicitelyCanPinMessages = true
|
explicitelyCanPinMessages = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
peerMonoforumId = nil
|
||||||
|
#endif
|
||||||
|
|
||||||
let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId
|
let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId
|
||||||
if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId {
|
if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId {
|
||||||
strongSelf.preloadHistoryPeerId = preloadHistoryPeerId
|
strongSelf.preloadHistoryPeerId = preloadHistoryPeerId
|
||||||
@ -1621,6 +1625,10 @@ extension ChatControllerImpl {
|
|||||||
explicitelyCanPinMessages = true
|
explicitelyCanPinMessages = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
peerMonoforumId = nil
|
||||||
|
#endif
|
||||||
|
|
||||||
let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId
|
let preloadHistoryPeerId = peerMonoforumId ?? peerDiscussionId
|
||||||
if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId {
|
if strongSelf.preloadHistoryPeerId != preloadHistoryPeerId {
|
||||||
strongSelf.preloadHistoryPeerId = preloadHistoryPeerId
|
strongSelf.preloadHistoryPeerId = preloadHistoryPeerId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user