Fix regressions in L&F (#944)

- Text appearance on iOS/macOS (broken by #943)
- Visual ambiguity in "Purchased" when no feature is eligible
- "Purchased" must be a form on macOS
This commit is contained in:
Davide 2024-11-26 16:50:37 +01:00 committed by GitHub
parent 4d84bd1dd6
commit b9f3500f31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 5 deletions

View File

@ -69,12 +69,16 @@ extension View {
}
public func scrollableOnTV() -> some View {
#if os(tvOS)
// focusable()
Button {
//
} label: {
self
}
#else
self
#endif
}
}

View File

@ -39,7 +39,7 @@ public struct PurchasedView: View {
}
public var body: some View {
listView
contentView
.themeEmpty(if: isEmpty, message: Strings.Views.Purchased.noPurchases)
.onLoad {
Task {
@ -64,8 +64,17 @@ private extension PurchasedView {
}
private extension PurchasedView {
var listView: some View {
List {
var contentView: some View {
#if os(macOS)
Form(content: sectionsGroup)
.themeForm()
#else
List(content: sectionsGroup)
#endif
}
func sectionsGroup() -> some View {
Group {
downloadSection
productsSection
featuresSection
@ -102,8 +111,7 @@ private extension PurchasedView {
HStack {
Text(feature.localizedDescription)
Spacer()
ThemeImage(.marked)
.opaque(iapManager.isEligible(for: feature))
ThemeImage(iapManager.isEligible(for: feature) ? .marked : .close)
}
.scrollableOnTV()
}