diff --git a/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift b/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift index 342945b9..cf7b5483 100644 --- a/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift +++ b/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift @@ -47,10 +47,19 @@ public struct AppAccountsSelectorView: View { labelView } .sheet(isPresented: $isPresented, content: { - accountsView.presentationDetents([.height(preferredHeight), .large]) - .onAppear { - refreshAccounts() - } + if #available(iOS 16.4, *) { + accountsView.presentationDetents([.height(preferredHeight), .large]) + .presentationBackground(.thinMaterial) + .presentationCornerRadius(16) + .onAppear { + refreshAccounts() + } + } else { + accountsView.presentationDetents([.height(preferredHeight), .large]) + .onAppear { + refreshAccounts() + } + } }) .onChange(of: currentAccount.account?.id) { _ in refreshAccounts() @@ -80,6 +89,14 @@ public struct AppAccountsSelectorView: View { .accessibilityHint("accessibility.app-account.selector.accounts.hint") } + private var accountBackgroundColor: Color { + if #available(iOS 16.4, *) { + return Color.clear + } else { + return theme.secondaryBackgroundColor + } + } + private var accountsView: some View { NavigationStack { List { @@ -108,7 +125,7 @@ public struct AppAccountsSelectorView: View { } .listStyle(.insetGrouped) .scrollContentBackground(.hidden) - .background(theme.secondaryBackgroundColor) + .background(accountBackgroundColor) .navigationTitle("settings.section.accounts") .navigationBarTitleDisplayMode(.inline) .toolbar { diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift index 53fdbb6b..82c79319 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift @@ -64,7 +64,6 @@ public struct AvatarView: View { AvatarPlaceholderView(size: size) } } - .animation(nil) .frame(width: size.size.width, height: size.size.height) } }