Fix archive chat title

This commit is contained in:
Peter 2019-05-03 18:29:06 +04:00
parent bcf5abe1f0
commit 94c157bcee

View File

@ -805,7 +805,9 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
switch contentData {
case let .chat(_, peer, _, _):
if peer?.id == item.context.account.peerId {
if isPeerGroup {
titleAttributedString = NSAttributedString(string: item.presentationData.strings.ChatList_ArchivedChatsTitle, font: titleFont, textColor: theme.titleColor)
} else if peer?.id == item.context.account.peerId {
titleAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_SavedMessages, font: titleFont, textColor: theme.titleColor)
} else if let displayTitle = peer?.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) {
titleAttributedString = NSAttributedString(string: displayTitle, font: titleFont, textColor: item.index.messageIndex.id.peerId.namespace == Namespaces.Peer.SecretChat ? theme.secretTitleColor : theme.titleColor)