Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit cb82204

Browse files
authored
Merge pull request #856 from kiwicom/853-textlinks-disappear-when-app-resigns-active
Only hide text values on .placeholder redaction reason
2 parents 868f673 + 44c3807 commit cb82204

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/Orbit/Components/TextLink.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public struct TextLink: UIViewRepresentable {
4040
private let content: NSAttributedString
4141

4242
private func resolvedLinkColor(in environment: EnvironmentValues) -> UIColor {
43-
if #available(iOS 14, *), environment.redactionReasons.isEmpty == false {
43+
if #available(iOS 14, *), environment.redactionReasons.contains(.placeholder) {
4444
return .clear
4545
}
4646

Sources/Orbit/Support/TextFields/TextField.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public struct TextField: UIViewRepresentable, TextFieldBuildable {
150150
}
151151

152152
private func resolvedTextColor(in environment: EnvironmentValues) -> UIColor {
153-
if #available(iOS 14, *), environment.redactionReasons.isEmpty == false {
153+
if #available(iOS 14, *), environment.redactionReasons.contains(.placeholder) {
154154
return .clear
155155
}
156156

Sources/Orbit/Support/TextFields/TextView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public struct TextView: UIViewRepresentable, TextFieldBuildable {
145145
}
146146

147147
private func resolvedTextColor(in environment: EnvironmentValues) -> UIColor {
148-
if #available(iOS 14, *), environment.redactionReasons.isEmpty == false {
148+
if #available(iOS 14, *), environment.redactionReasons.contains(.placeholder) {
149149
return .clear
150150
}
151151

0 commit comments

Comments
 (0)