Skip to content

Commit

Permalink
Fix tvOS and watchOS HTML black text issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Jun 6, 2023
1 parent 1bd5ce8 commit f15f9e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Forumate/View/StarterIntro/StarterIntro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import SwiftUI
struct StarterIntro: View {
@Environment(\.dismiss) private var dismiss
@Environment(\.supportsMultipleWindows) private var supportsMultipleWindows
#if os(iOS)
@Environment(\.verticalSizeClass) private var verticalSizeClass

#endif

var body: some View {
VStack {
ScrollView {
Expand Down
2 changes: 1 addition & 1 deletion HtmlText/Sources/HtmlText/HtmlText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public struct HtmlText: View {

public var body: some View {
if let nsAttributedString = try? NSAttributedString(data: Data(html.utf8), options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil),
let attributedString = try? AttributedString(nsAttributedString, including: \.uiKit) {
let attributedString = try? AttributedString(nsAttributedString, including: \.swiftUI) {
Text(attributedString)
} else {
// fallback...
Expand Down

0 comments on commit f15f9e1

Please sign in to comment.