mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix empty chat node
This commit is contained in:
parent
a3b8870065
commit
c522d7f67d
@ -1743,15 +1743,19 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
||||
|
||||
let loadState: ChatHistoryNodeLoadState
|
||||
if let historyView = strongSelf.historyView {
|
||||
if let firstEntry = historyView.originalView.entries.first, historyView.filteredEntries.isEmpty {
|
||||
var isPeerJoined = false
|
||||
for media in firstEntry.message.media {
|
||||
if let action = media as? TelegramMediaAction, action.action == .peerJoined {
|
||||
isPeerJoined = true
|
||||
break
|
||||
if historyView.filteredEntries.isEmpty {
|
||||
if let firstEntry = historyView.originalView.entries.first {
|
||||
var isPeerJoined = false
|
||||
for media in firstEntry.message.media {
|
||||
if let action = media as? TelegramMediaAction, action.action == .peerJoined {
|
||||
isPeerJoined = true
|
||||
break
|
||||
}
|
||||
}
|
||||
loadState = .empty(isPeerJoined ? .joined : .generic)
|
||||
} else {
|
||||
loadState = .empty(.generic)
|
||||
}
|
||||
loadState = .empty(isPeerJoined ? .joined : .generic)
|
||||
} else {
|
||||
loadState = .messages
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user