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,7 +1743,8 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
|||||||
|
|
||||||
let loadState: ChatHistoryNodeLoadState
|
let loadState: ChatHistoryNodeLoadState
|
||||||
if let historyView = strongSelf.historyView {
|
if let historyView = strongSelf.historyView {
|
||||||
if let firstEntry = historyView.originalView.entries.first, historyView.filteredEntries.isEmpty {
|
if historyView.filteredEntries.isEmpty {
|
||||||
|
if let firstEntry = historyView.originalView.entries.first {
|
||||||
var isPeerJoined = false
|
var isPeerJoined = false
|
||||||
for media in firstEntry.message.media {
|
for media in firstEntry.message.media {
|
||||||
if let action = media as? TelegramMediaAction, action.action == .peerJoined {
|
if let action = media as? TelegramMediaAction, action.action == .peerJoined {
|
||||||
@ -1752,6 +1753,9 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadState = .empty(isPeerJoined ? .joined : .generic)
|
loadState = .empty(isPeerJoined ? .joined : .generic)
|
||||||
|
} else {
|
||||||
|
loadState = .empty(.generic)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
loadState = .messages
|
loadState = .messages
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user