Premium features

This commit is contained in:
Isaac
2024-03-19 14:20:31 +04:00
parent 0fc64aa505
commit bd8514ff20
63 changed files with 47586 additions and 46860 deletions

View File

@@ -166,6 +166,10 @@ public final class ChatEmptyNodeGreetingChatContent: ASDisplayNode, ChatEmptyNod
customStickerFile = stickerFile
self.titleNode.attributedText = NSAttributedString(string: title, font: titleFont, textColor: serviceColor.primaryText)
self.textNode.attributedText = NSAttributedString(string: text, font: messageFont, textColor: serviceColor.primaryText)
} else if let businessIntro = interfaceState.businessIntro {
self.titleNode.attributedText = NSAttributedString(string: !businessIntro.title.isEmpty ? businessIntro.title : interfaceState.strings.Conversation_EmptyPlaceholder, font: titleFont, textColor: serviceColor.primaryText)
self.textNode.attributedText = NSAttributedString(string: !businessIntro.text.isEmpty ? businessIntro.text : interfaceState.strings.Conversation_GreetingText, font: messageFont, textColor: serviceColor.primaryText)
customStickerFile = businessIntro.stickerFile
} else {
self.titleNode.attributedText = NSAttributedString(string: interfaceState.strings.Conversation_EmptyPlaceholder, font: titleFont, textColor: serviceColor.primaryText)
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Conversation_GreetingText, font: messageFont, textColor: serviceColor.primaryText)
@@ -1292,8 +1296,6 @@ public final class ChatEmptyNode: ASDisplayNode {
} else {
if peer.isDeleted || peer.botInfo != nil || peer.flags.contains(.isSupport) || peer.isScam || interfaceState.peerIsBlocked {
contentType = .regular
} else if case .clearedHistory = emptyType {
contentType = .regular
} else {
contentType = .greeting
}