Various fixes

This commit is contained in:
Ilya Laktyushin 2024-04-30 13:23:28 +04:00
parent 330117ef3e
commit 80a52bdb72
2 changed files with 12 additions and 3 deletions

View File

@ -3049,9 +3049,11 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
isFirstForumThreadSelectable = forumThread.isUnread
forumThreads.append((id: forumThread.id, title: NSAttributedString(string: forumThread.title, font: textFont, textColor: forumThread.isUnread || isSearching ? theme.authorNameColor : theme.messageTextColor), iconId: forumThread.iconId, iconColor: forumThread.iconColor))
}
for item in topForumTopicItems {
if forumThread?.id != item.id {
forumThreads.append((id: item.id, title: NSAttributedString(string: item.title, font: textFont, textColor: item.isUnread || isSearching ? theme.authorNameColor : theme.messageTextColor), iconId: item.iconFileId, iconColor: item.iconColor))
for topicItem in topForumTopicItems {
if case let .peer(peer) = item.content, peer.peer.peerId.id._internalGetInt64Value() == topicItem.id {
} else if forumThread?.id != topicItem.id {
forumThreads.append((id: topicItem.id, title: NSAttributedString(string: topicItem.title, font: textFont, textColor: topicItem.isUnread || isSearching ? theme.authorNameColor : theme.messageTextColor), iconId: topicItem.iconFileId, iconColor: topicItem.iconColor))
}
}

View File

@ -239,6 +239,13 @@ public final class ChatInlineSearchResultsListComponent: Component {
super.init(frame: frame)
self.addSubnode(self.listNode)
self.listNode.beganInteractiveDragging = { [weak self] _ in
guard let self else {
return
}
self.window?.endEditing(true)
}
}
required public init?(coder: NSCoder) {