From 648c3e658e5cfd925bfc0595eed76ed350475912 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Fri, 17 May 2024 10:11:31 +1000 Subject: [PATCH] fix incorrectly displayed empty state in home screen --- Session/Home/HomeVC.swift | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index cc3f24166..22e1850df 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -497,19 +497,18 @@ final class HomeVC: BaseVC, LibSessionRespondingViewController, UITableViewDataS // Show the empty state if there is no data if self.flow == .register { - accountCreatedView.isHidden = ( - !updatedData.isEmpty && - updatedData.contains(where: { !$0.elements.isEmpty }) - ) + accountCreatedView.isHidden = false emptyStateLogoView.isHidden = true } else { + accountCreatedView.isHidden = true emptyStateLogoView.isHidden = false - emptyStateView.isHidden = ( - !updatedData.isEmpty && - updatedData.contains(where: { !$0.elements.isEmpty }) - ) } + emptyStateStackView.isHidden = ( + !updatedData.isEmpty && + updatedData.contains(where: { !$0.elements.isEmpty }) + ) + CATransaction.begin() CATransaction.setCompletionBlock { [weak self] in // Complete page loading