mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Additional topic fixes
This commit is contained in:
parent
6c37615dbd
commit
631d5e1b2f
2 changed files with 14 additions and 0 deletions
|
|
@ -406,6 +406,14 @@ public final class ChatTopicsHeaderPanelComponent: Component {
|
|||
|
||||
return size
|
||||
}
|
||||
|
||||
public func topicIndex(threadId: Int64?) -> Int? {
|
||||
if let panelView = self.panel.view as? ChatSideTopicsPanel.View {
|
||||
return panelView.topicIndex(threadId: threadId)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func makeView() -> View {
|
||||
|
|
|
|||
|
|
@ -5058,6 +5058,12 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
leftIndex = floatingTopicsPanelView.topicIndex(threadId: fromLocation)
|
||||
rightIndex = floatingTopicsPanelView.topicIndex(threadId: toLocation)
|
||||
}
|
||||
if leftIndex == nil || rightIndex == nil {
|
||||
if let headerPanelsComponentView = self.headerPanelsView?.view as? HeaderPanelContainerComponent.View, let topicsPanelView = headerPanelsComponentView.panel(forKey: AnyHashable("topics")) as? ChatTopicsHeaderPanelComponent.View {
|
||||
leftIndex = topicsPanelView.topicIndex(threadId: fromLocation)
|
||||
rightIndex = topicsPanelView.topicIndex(threadId: toLocation)
|
||||
}
|
||||
}
|
||||
guard let leftIndex, let rightIndex else {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue