Skip to content
Snippets Groups Projects
Commit 1d243994 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UI: fix animation when close account list

Change-Id: Iad4404cd04e423c6d11431262cd1739948976fa7
parent a01297f9
Branches
Tags
No related merge requests found
...@@ -24,6 +24,7 @@ struct AccountLists: View { ...@@ -24,6 +24,7 @@ struct AccountLists: View {
@ObservedObject var model: AccountsViewModel @ObservedObject var model: AccountsViewModel
var createAccountCallback: (() -> Void) var createAccountCallback: (() -> Void)
var accountSelectedCallback: (() -> Void) var accountSelectedCallback: (() -> Void)
var closeCallback: (() -> Void)
let verticalSpacing: CGFloat = 15 let verticalSpacing: CGFloat = 15
let maxHeight: CGFloat = 300 let maxHeight: CGFloat = 300
let cornerRadius: CGFloat = 16 let cornerRadius: CGFloat = 16
...@@ -55,7 +56,7 @@ struct AccountLists: View { ...@@ -55,7 +56,7 @@ struct AccountLists: View {
Spacer() // Pushes the button to the right Spacer() // Pushes the button to the right
CloseButton( CloseButton(
action: accountSelectedCallback, action: closeCallback,
accessibilityIdentifier: SmartListAccessibilityIdentifiers.closeAccountsList accessibilityIdentifier: SmartListAccessibilityIdentifiers.closeAccountsList
) )
} }
......
...@@ -145,6 +145,8 @@ struct SmartListView: View, StateEmittingView { ...@@ -145,6 +145,8 @@ struct SmartListView: View, StateEmittingView {
stateEmitter?.createAccount() stateEmitter?.createAccount()
}, accountSelectedCallback: { }, accountSelectedCallback: {
showAccountList.toggle() showAccountList.toggle()
}, closeCallback: {
animateAccountListVisibility()
}) })
.zIndex(1) .zIndex(1)
.transition(.move(edge: .bottom)) .transition(.move(edge: .bottom))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment