Skip to content

Commit 6092396

Browse files
authored
Merge pull request #252 from synonymdev/fix/wallet-load-first-receive
2 parents 5437871 + ccb2eb3 commit 6092396

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Bitkit/Views/Wallets/HomeView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct HomeView: View {
2222
.padding(.top, 16 + 48)
2323
.padding(.horizontal, 16)
2424

25-
if !app.showHomeViewEmptyState {
25+
if !app.showHomeViewEmptyState || wallet.totalBalanceSats > 0 {
2626
VStack(spacing: 0) {
2727
HStack(spacing: 0) {
2828
NavigationLink(value: Route.savingsWallet) {
@@ -86,9 +86,9 @@ struct HomeView: View {
8686
}
8787
}
8888
.animation(.spring(response: 0.3), value: app.showHomeViewEmptyState)
89-
.onChange(of: wallet.totalBalanceSats) { _ in
90-
if wallet.totalBalanceSats > 0 {
91-
DispatchQueue.main.async {
89+
.onChange(of: wallet.totalBalanceSats) { newValue in
90+
if newValue > 0 && app.showHomeViewEmptyState {
91+
withAnimation(.spring(response: 0.3)) {
9292
app.showHomeViewEmptyState = false
9393
}
9494
}

0 commit comments

Comments
 (0)