Skip to content

Commit 4858a0f

Browse files
cortinicofacebook-github-bot
authored andcommitted
Mark ReactTextInlineImageShadowNode as @LegacyArchitecture (#53735)
Summary: Pull Request resolved: #53735 This class should have been marked as LegacyArchitecture back then but was forgotten. I'm doing it now. Changelog: [Internal] - Reviewed By: javache Differential Revision: D82219780 fbshipit-source-id: 5119b7469733d5d2d4b16e976b09231ad5f71f5f
1 parent f93506f commit 4858a0f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import com.facebook.react.views.text.ReactTypefaceUtils.parseFontStyle
3434
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontVariant
3535
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontWeight
3636
import com.facebook.react.views.text.TextTransform.Companion.apply
37-
import com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode
3837
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan
3938
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan
4039
import com.facebook.react.views.text.internal.span.CustomStyleSpan
@@ -523,6 +522,7 @@ public constructor(
523522
while (i < length) {
524523
val child: ReactShadowNode<*> = textShadowNode.getChildAt(i)
525524

525+
@Suppress("DEPRECATION")
526526
if (child is ReactRawTextShadowNode) {
527527
child.text?.let { sb.append(apply(it, textAttributes.textTransform)) }
528528
} else if (child is ReactBaseTextShadowNode) {
@@ -535,7 +535,7 @@ public constructor(
535535
inlineViews,
536536
sb.length,
537537
)
538-
} else if (child is ReactTextInlineImageShadowNode) {
538+
} else if (child is com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode) {
539539
// We make the image take up 1 character in the span and put a corresponding character
540540
// into the text so that the image doesn't run over any following text.
541541
sb.append(INLINE_VIEW_PLACEHOLDER)

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.views.text.frescosupport
911

1012
import android.content.Context

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/ReactTextInlineImageShadowNode.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@
99

1010
package com.facebook.react.views.text.internal
1111

12+
import com.facebook.react.common.annotations.internal.LegacyArchitecture
13+
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
1214
import com.facebook.react.uimanager.LayoutShadowNode
1315
import com.facebook.react.views.text.internal.span.TextInlineImageSpan
1416
import com.facebook.yoga.YogaNode
1517

1618
/** Base class for [YogaNode]s that represent inline images. */
19+
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
20+
@Deprecated(
21+
message = "This class is part of Legacy Architecture and will be removed in a future release",
22+
level = DeprecationLevel.WARNING,
23+
)
1724
internal abstract class ReactTextInlineImageShadowNode : LayoutShadowNode() {
1825
/**
1926
* Build a [TextInlineImageSpan] from this node. This will be added to the TextView in place of

0 commit comments

Comments
 (0)