Skip to content

Commit

Permalink
Fix regressions in L&F (#944)
Browse files Browse the repository at this point in the history
- Text appearance on iOS/macOS (broken by #943)
- Visual ambiguity in "Purchased" when no feature is eligible
- "Purchased" must be a form on macOS
  • Loading branch information
keeshux authored Nov 26, 2024
1 parent 4d84bd1 commit b9f3500
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ extension View {
}

public func scrollableOnTV() -> some View {
#if os(tvOS)
// focusable()
Button {
//
} label: {
self
}
#else
self
#endif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit b9f3500

Please sign in to comment.