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 {
List {
Section {
#if !targetEnvironment(macCatalyst)
#if !targetEnvironment(macCatalyst) && !os(visionOS)
HStack {
Spacer()
Image(uiImage: .init(named: "AppIconAlternate0")!)

View file

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