From 6bb3919819d793570894d98befb8a935d3dcee34 Mon Sep 17 00:00:00 2001 From: Nuo Xu Date: Thu, 16 Nov 2023 18:16:26 +0800 Subject: [PATCH] remove unnecessary animation in asset detail --- .../Crypto/Asset Details/AssetDetailHeaderView.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Sources/BraveWallet/Crypto/Asset Details/AssetDetailHeaderView.swift b/Sources/BraveWallet/Crypto/Asset Details/AssetDetailHeaderView.swift index 713bfb733fc..7720082d820 100644 --- a/Sources/BraveWallet/Crypto/Asset Details/AssetDetailHeaderView.swift +++ b/Sources/BraveWallet/Crypto/Asset Details/AssetDetailHeaderView.swift @@ -173,12 +173,20 @@ struct AssetDetailHeaderView: View { } HStack { tokenImageNameAndNetwork + .transaction { transaction in + transaction.animation = nil + transaction.disablesAnimations = true + } } } .frame(maxWidth: .infinity, alignment: .leading) } else { HStack { tokenImageNameAndNetwork + .transaction { transaction in + transaction.animation = nil + transaction.disablesAnimations = true + } if horizontalSizeClass == .regular { Spacer() DateRangeView(selectedRange: $assetDetailStore.timeframe) @@ -255,6 +263,10 @@ struct AssetDetailHeaderView: View { } actionButtonsContainer .padding(.horizontal, assetDetailStore.assetDetailToken.isFungibleToken ? 0 : 16) + .transaction { transaction in + transaction.animation = nil + transaction.disablesAnimations = true + } } } }