mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
1cd53598d0
commit
57c7a4d521
@ -178,7 +178,7 @@ public class ChatListItem: ListViewItem, ChatListSearchItemNeighbour {
|
||||
if case let .forum(_, _, threadIdValue, _, _) = self.index {
|
||||
threadId = threadIdValue
|
||||
}
|
||||
self.interaction.messageSelected(peer, threadId, message, promoInfo)
|
||||
self.interaction.messageSelected(peer, threadId ?? message.threadId, message, promoInfo)
|
||||
} else if let peer = peer.peer {
|
||||
self.interaction.peerSelected(peer, nil, nil, promoInfo)
|
||||
} else if let peer = peer.peers[peer.peerId] {
|
||||
@ -1351,6 +1351,10 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
hasUnseenReactions = hasUnseenReactionsValue
|
||||
forumTopicData = forumTopicDataValue
|
||||
topForumTopicItems = topForumTopicItemsValue
|
||||
|
||||
if item.interaction.searchTextHighightState != nil, threadInfo == nil, topForumTopicItems.isEmpty, let message = messagesValue.first, let threadId = message.threadId, let associatedThreadInfo = message.associatedThreadInfo {
|
||||
topForumTopicItems = [EngineChatList.ForumTopicData(id: threadId, title: associatedThreadInfo.title, iconFileId: associatedThreadInfo.icon, iconColor: associatedThreadInfo.iconColor, maxOutgoingReadMessageId: message.id, isUnread: false)]
|
||||
}
|
||||
|
||||
switch peerValue.peer {
|
||||
case .user, .secretChat:
|
||||
@ -2018,14 +2022,16 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
|
||||
var effectiveAuthorTitle = (hideAuthor && !hasDraft) ? nil : authorAttributedString
|
||||
|
||||
let isSearching = item.interaction.searchTextHighightState != nil
|
||||
|
||||
var forumThreads: [(id: Int64, title: NSAttributedString, iconId: Int64?, iconColor: Int32)] = []
|
||||
if forumThread != nil || !topForumTopicItems.isEmpty {
|
||||
if let forumThread = forumThread {
|
||||
forumThreads.append((id: forumThread.id, title: NSAttributedString(string: forumThread.title, font: textFont, textColor: forumThread.isUnread ? theme.authorNameColor : theme.messageTextColor), iconId: forumThread.iconId, iconColor: forumThread.iconColor))
|
||||
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 ? theme.authorNameColor : theme.messageTextColor), iconId: item.iconFileId, iconColor: item.iconColor))
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
@ -2492,7 +2498,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
let textNodeFrame = CGRect(origin: CGPoint(x: contentRect.origin.x - 1.0, y: contentRect.minY + titleLayout.size.height - 1.0 + UIScreenPixel + (authorLayout.height.isZero ? 0.0 : (authorLayout.height - 3.0))), size: textLayout.size)
|
||||
strongSelf.textNode.textNode.frame = textNodeFrame
|
||||
|
||||
if let textArrowImage = textArrowImage {
|
||||
if let textArrowImage = textArrowImage, !isSearching {
|
||||
let textArrowNode: ASImageNode
|
||||
if let current = strongSelf.textArrowNode {
|
||||
textArrowNode = current
|
||||
@ -2510,7 +2516,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
textArrowNode.removeFromSupernode()
|
||||
}
|
||||
|
||||
if let topForumTopicRect {
|
||||
if let topForumTopicRect, !isSearching {
|
||||
let compoundHighlightingNode: LinkHighlightingNode
|
||||
if let current = strongSelf.compoundHighlightingNode {
|
||||
compoundHighlightingNode = current
|
||||
|
@ -666,7 +666,7 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
|
||||
panelSeparatorColor: UIColor(rgb: 0x545458, alpha: 0.3),
|
||||
panelBackgroundColor: UIColor(rgb: 0x141414, alpha: 0.65),
|
||||
buttonFillColor: UIColor(rgb: 0xe9e9e9, alpha: 0.85),
|
||||
buttonHighlightColor: UIColor(rgb: 0xffffff, alpha: 0.1),
|
||||
buttonHighlightColor: UIColor(rgb: 0xffffff, alpha: 0.05),
|
||||
buttonStrokeColor: UIColor(rgb: 0x000000, alpha: 0.85),
|
||||
buttonHighlightedFillColor: UIColor(rgb: 0x5a5a5a, alpha: 0.7),
|
||||
buttonHighlightedStrokeColor: UIColor(rgb: 0x0c0c0c),
|
||||
|
Loading…
x
Reference in New Issue
Block a user