Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2022-10-05 14:32:22 +03:00
86 changed files with 2049 additions and 1667 deletions

View File

@@ -838,9 +838,13 @@ final class ChatEmptyNodeTopicChatContent: ASDisplayNode, ChatEmptyNodeContent,
if let fileId = self.fileId {
iconContent = .animation(content: .customEmoji(fileId: fileId), size: CGSize(width: 32.0, height: 32.0), placeholderColor: .clear, themeColor: serviceColor.primaryText, loopMode: .count(2))
} else {
iconContent = .topic(title: String(title.prefix(1)))
var colorIndex: Int = 0
if case let .replyThread(replyThreadMessage) = interfaceState.chatLocation {
colorIndex = Int(clamping: abs(replyThreadMessage.effectiveTopId.id))
}
iconContent = .topic(title: String(title.prefix(1)), colorIndex: colorIndex)
}
let insets = UIEdgeInsets(top: inset, left: inset, bottom: inset, right: inset)
let titleSpacing: CGFloat = 6.0
let iconSpacing: CGFloat = 9.0