Fix crash on visionOS in AboutView

This commit is contained in:
Thomas Ricouard 2024-02-11 18:59:34 +01:00
parent 77aa50ef19
commit 7423aba92a
2 changed files with 8 additions and 3 deletions

View file

@ -27,7 +27,7 @@ struct AboutView: View {
var body: some View { var body: some View {
List { List {
Section { Section {
#if !targetEnvironment(macCatalyst) #if !targetEnvironment(macCatalyst) && !os(visionOS)
HStack { HStack {
Spacer() Spacer()
Image(uiImage: .init(named: "AppIconAlternate0")!) Image(uiImage: .init(named: "AppIconAlternate0")!)

View file

@ -96,6 +96,9 @@ public struct AppAccountsSelectorView: View {
AppAccountView(viewModel: viewModel, isParentPresented: $isPresented) AppAccountView(viewModel: viewModel, isParentPresented: $isPresented)
} }
addAccountButton addAccountButton
#if os(visionOS)
.foregroundStyle(theme.labelColor)
#endif
} }
#if !os(visionOS) #if !os(visionOS)
.listRowBackground(theme.primaryBackgroundColor) .listRowBackground(theme.primaryBackgroundColor)
@ -107,8 +110,10 @@ public struct AppAccountsSelectorView: View {
aboutButton aboutButton
supportButton supportButton
} }
#if !os(visionOS) #if os(visionOS)
.listRowBackground(theme.primaryBackgroundColor) .foregroundStyle(theme.labelColor)
#else
.listRowBackground(theme.primaryBackgroundColor)
#endif #endif
} }
} }