Forum improvements

This commit is contained in:
Isaac
2025-11-11 20:05:29 +08:00
parent 89ce010de2
commit 7acf2b0b41
10 changed files with 63 additions and 36 deletions

View File

@@ -244,7 +244,7 @@ func floatingTopicsPanelForChatPresentationInterfaceState(_ chatPresentationInte
case .loading:
return nil
case let .loaded(isEmpty, _):
if isEmpty {
if isEmpty && chatPresentationInterfaceState.chatLocation.threadId == nil {
return nil
}
}
@@ -267,7 +267,7 @@ func floatingTopicsPanelForChatPresentationInterfaceState(_ chatPresentationInte
interfaceInteraction?.toggleChatSidebarMode()
},
updateTopicId: { [weak interfaceInteraction] topicId, direction in
interfaceInteraction?.updateChatLocationThread(topicId, direction ? .down : .up)
interfaceInteraction?.updateChatLocationThread(topicId, direction)
},
openDeletePeer: { [weak interfaceInteraction] threadId in
guard let controller = interfaceInteraction?.chatController() as? ChatControllerImpl else {
@@ -293,7 +293,7 @@ func floatingTopicsPanelForChatPresentationInterfaceState(_ chatPresentationInte
interfaceInteraction?.toggleChatSidebarMode()
},
updateTopicId: { [weak interfaceInteraction] topicId, direction in
interfaceInteraction?.updateChatLocationThread(topicId, direction ? .down : .up)
interfaceInteraction?.updateChatLocationThread(topicId, direction)
},
openDeletePeer: { [weak interfaceInteraction] threadId in
guard let controller = interfaceInteraction?.chatController() as? ChatControllerImpl else {
@@ -319,7 +319,7 @@ func floatingTopicsPanelForChatPresentationInterfaceState(_ chatPresentationInte
interfaceInteraction?.toggleChatSidebarMode()
},
updateTopicId: { [weak interfaceInteraction] topicId, direction in
interfaceInteraction?.updateChatLocationThread(topicId, direction ? .down : .up)
interfaceInteraction?.updateChatLocationThread(topicId, direction)
},
openDeletePeer: { [weak interfaceInteraction] threadId in
guard let controller = interfaceInteraction?.chatController() as? ChatControllerImpl else {