Skip to content

Commit d5008ea

Browse files
authored
fix(text): set async thread flags for text filters (#1111)
1 parent e35c421 commit d5008ea

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

‎Sources/OpenSwiftUICore/View/Text/Text/Text+View.swift‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@ private struct ResolvedTextFilter: StatefulRule, AsyncAttribute {
12211221

12221222
typealias Value = ResolvedStyledText
12231223

1224+
// NOTE: Forces the output’s mainRef to false, regardless of those inputs.
1225+
static var flags: Flags { .asyncThread }
1226+
12241227
mutating func updateValue() {
12251228
let (text, textChanged) = $text.changedValue()
12261229
let (environment, environmentChanged) = $environment.changedValue()
@@ -1459,6 +1462,9 @@ struct ResolvedOptionalTextFilter: StatefulRule, AsyncAttribute {
14591462

14601463
typealias Value = ResolvedStyledText?
14611464

1465+
// NOTE: Forces the output’s mainRef to false, regardless of those inputs.
1466+
static var flags: Flags { .asyncThread }
1467+
14621468
mutating func updateValue() {
14631469
let (text, textChanged) = $text.changedValue()
14641470
let (environment, environmentChanged) = $environment.changedValue()
@@ -1512,7 +1518,7 @@ struct ResolvedOptionalTextFilter: StatefulRule, AsyncAttribute {
15121518

15131519
// MARK: - DynamicTextView [WIP]
15141520

1515-
struct DynamicTextView: PrimitiveView, UnaryView {
1521+
private struct DynamicTextView: PrimitiveView, UnaryView {
15161522
var text: ResolvedStyledText
15171523
var size: CGSize
15181524

@@ -1522,6 +1528,18 @@ struct DynamicTextView: PrimitiveView, UnaryView {
15221528
) -> _ViewOutputs {
15231529
_openSwiftUIUnimplementedFailure()
15241530
}
1531+
1532+
// FIXME
1533+
private struct DynamicTextFilter: StatefulRule, AsyncAttribute {
1534+
struct Value {}
1535+
1536+
// NOTE: Forces the output’s mainRef to false, regardless of those inputs.
1537+
static var flags: Flags { .asyncThread }
1538+
1539+
func updateValue() {
1540+
_openSwiftUIUnimplementedFailure()
1541+
}
1542+
}
15251543
}
15261544

15271545
// MARK: - StyledTextLayoutEngine

0 commit comments

Comments
 (0)