Add haptic feedbacks when changing account

This commit is contained in:
Thomas Ricouard 2023-03-09 06:36:38 +01:00
parent 0709ce0958
commit 82dfeffaec

View file

@ -93,11 +93,13 @@ public struct AppAccountView: View {
let account = viewModel.account let account = viewModel.account
{ {
routerPath.navigate(to: .accountSettingsWithAccount(account: account, appAccount: viewModel.appAccount)) routerPath.navigate(to: .accountSettingsWithAccount(account: account, appAccount: viewModel.appAccount))
HapticManager.shared.fireHaptic(of: .buttonPress)
} else { } else {
var transation = Transaction() var transation = Transaction()
transation.disablesAnimations = true transation.disablesAnimations = true
withTransaction(transation) { withTransaction(transation) {
appAccounts.currentAccount = viewModel.appAccount appAccounts.currentAccount = viewModel.appAccount
HapticManager.shared.fireHaptic(of: .notification(.success))
} }
} }
} }