Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-01-24 23:29:46 +03:00
parent 10612a88a4
commit b6ed138716
2 changed files with 9 additions and 1 deletions

View File

@@ -307,6 +307,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
let loadingNode: ChatLoadingNode
private var emptyNode: ChatEmptyNode?
private var emptyType: ChatHistoryNodeLoadState.EmptyType?
private var didDisplayEmptyGreeting = false
private var validEmptyNodeLayout: (CGSize, UIEdgeInsets)?
var restrictedNode: ChatRecentActionsEmptyNode?
@@ -539,6 +540,13 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
var emptyType: ChatHistoryNodeLoadState.EmptyType?
if case let .empty(type) = loadState {
emptyType = type
if case .joined = type {
if strongSelf.didDisplayEmptyGreeting {
emptyType = .generic
} else {
strongSelf.didDisplayEmptyGreeting = true
}
}
}
strongSelf.updateIsEmpty(emptyType, animated: animated)
}