diff --git a/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift b/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift index 5eb9a8952434d1b6eeadcdfa8036eb2c5d9d2e26..ec14bc57c40dee1b3a667aa1d45c4963c35a6666 100644 --- a/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift +++ b/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift @@ -24,6 +24,7 @@ struct AccountLists: View { @ObservedObject var model: AccountsViewModel var createAccountCallback: (() -> Void) var accountSelectedCallback: (() -> Void) + var closeCallback: (() -> Void) let verticalSpacing: CGFloat = 15 let maxHeight: CGFloat = 300 let cornerRadius: CGFloat = 16 @@ -55,7 +56,7 @@ struct AccountLists: View { Spacer() // Pushes the button to the right CloseButton( - action: accountSelectedCallback, + action: closeCallback, accessibilityIdentifier: SmartListAccessibilityIdentifiers.closeAccountsList ) } diff --git a/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/SmartListContainer.swift b/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/SmartListContainer.swift index 04aed955cf2f3231e7b2a460db0c01e0bce0a393..3f9a9c290c02617c695fccc4c41df53d1893990d 100644 --- a/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/SmartListContainer.swift +++ b/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/SmartListContainer.swift @@ -145,6 +145,8 @@ struct SmartListView: View, StateEmittingView { stateEmitter?.createAccount() }, accountSelectedCallback: { showAccountList.toggle() + }, closeCallback: { + animateAccountListVisibility() }) .zIndex(1) .transition(.move(edge: .bottom))