Comment [WIP]

This commit is contained in:
Ali
2020-09-26 19:00:57 +03:00
parent 4076d3dc4d
commit e2f8229ae2
21 changed files with 3949 additions and 3774 deletions

View File

@@ -182,7 +182,7 @@ func chatHistoryEntriesForView(location: ChatLocation, view: MessageHistoryView,
}
if includeChatInfoEntry {
if view.earlierId == nil {
if view.earlierId == nil, !view.isLoading {
var cachedPeerData: CachedPeerData?
for entry in view.additionalData {
if case let .cachedPeerData(_, data) = entry {
@@ -190,8 +190,10 @@ func chatHistoryEntriesForView(location: ChatLocation, view: MessageHistoryView,
break
}
}
if let cachedPeerData = cachedPeerData as? CachedUserData, let botInfo = cachedPeerData.botInfo, !botInfo.description.isEmpty {
entries.insert(.ChatInfoEntry(botInfo.description, presentationData), at: 0)
if case let .peer(peerId) = location, peerId.isReplies {
entries.insert(.ChatInfoEntry(presentationData.strings.RepliesChat_DescriptionTitle, presentationData.strings.RepliesChat_DescriptionText, presentationData), at: 0)
} else if let cachedPeerData = cachedPeerData as? CachedUserData, let botInfo = cachedPeerData.botInfo, !botInfo.description.isEmpty {
entries.insert(.ChatInfoEntry(presentationData.strings.Bot_DescriptionTitle, botInfo.description, presentationData), at: 0)
} else {
var isEmpty = true
if entries.count <= 3 {