From 1d243994af728d47cac6e9dc0ed1f3e3eed97d64 Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> Date: Mon, 24 Mar 2025 16:52:40 -0400 Subject: [PATCH] UI: fix animation when close account list Change-Id: Iad4404cd04e423c6d11431262cd1739948976fa7 --- .../Conversations/SmartList/SwiftUI/Views/AccountLists.swift | 3 ++- .../SmartList/SwiftUI/Views/SmartListContainer.swift | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift b/Ring/Ring/Features/Conversations/SmartList/SwiftUI/Views/AccountLists.swift index 5eb9a8952..ec14bc57c 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 04aed955c..3f9a9c290 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)) -- GitLab