fix incorrectly displayed empty state in home screen

pull/891/head
Ryan ZHAO 12 months ago
parent aa5d7f14d3
commit 648c3e658e

@ -497,18 +497,17 @@ final class HomeVC: BaseVC, LibSessionRespondingViewController, UITableViewDataS
// Show the empty state if there is no data // Show the empty state if there is no data
if self.flow == .register { if self.flow == .register {
accountCreatedView.isHidden = ( accountCreatedView.isHidden = false
!updatedData.isEmpty &&
updatedData.contains(where: { !$0.elements.isEmpty })
)
emptyStateLogoView.isHidden = true emptyStateLogoView.isHidden = true
} else { } else {
accountCreatedView.isHidden = true
emptyStateLogoView.isHidden = false emptyStateLogoView.isHidden = false
emptyStateView.isHidden = ( }
emptyStateStackView.isHidden = (
!updatedData.isEmpty && !updatedData.isEmpty &&
updatedData.contains(where: { !$0.elements.isEmpty }) updatedData.contains(where: { !$0.elements.isEmpty })
) )
}
CATransaction.begin() CATransaction.begin()
CATransaction.setCompletionBlock { [weak self] in CATransaction.setCompletionBlock { [weak self] in

Loading…
Cancel
Save