mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Mark ReactTextInlineImageShadowNode as @LegacyArchitecture (#53735)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f93506fb23
commit
4858a0f469
+2
-2
@@ -34,7 +34,6 @@ import com.facebook.react.views.text.ReactTypefaceUtils.parseFontStyle
|
||||
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontVariant
|
||||
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontWeight
|
||||
import com.facebook.react.views.text.TextTransform.Companion.apply
|
||||
import com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode
|
||||
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan
|
||||
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan
|
||||
import com.facebook.react.views.text.internal.span.CustomStyleSpan
|
||||
@@ -523,6 +522,7 @@ public constructor(
|
||||
while (i < length) {
|
||||
val child: ReactShadowNode<*> = textShadowNode.getChildAt(i)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
if (child is ReactRawTextShadowNode) {
|
||||
child.text?.let { sb.append(apply(it, textAttributes.textTransform)) }
|
||||
} else if (child is ReactBaseTextShadowNode) {
|
||||
@@ -535,7 +535,7 @@ public constructor(
|
||||
inlineViews,
|
||||
sb.length,
|
||||
)
|
||||
} else if (child is ReactTextInlineImageShadowNode) {
|
||||
} else if (child is com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode) {
|
||||
// We make the image take up 1 character in the span and put a corresponding character
|
||||
// into the text so that the image doesn't run over any following text.
|
||||
sb.append(INLINE_VIEW_PLACEHOLDER)
|
||||
|
||||
+2
@@ -5,6 +5,8 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.facebook.react.views.text.frescosupport
|
||||
|
||||
import android.content.Context
|
||||
|
||||
+7
@@ -9,11 +9,18 @@
|
||||
|
||||
package com.facebook.react.views.text.internal
|
||||
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitecture
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
|
||||
import com.facebook.react.uimanager.LayoutShadowNode
|
||||
import com.facebook.react.views.text.internal.span.TextInlineImageSpan
|
||||
import com.facebook.yoga.YogaNode
|
||||
|
||||
/** Base class for [YogaNode]s that represent inline images. */
|
||||
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
|
||||
@Deprecated(
|
||||
message = "This class is part of Legacy Architecture and will be removed in a future release",
|
||||
level = DeprecationLevel.WARNING,
|
||||
)
|
||||
internal abstract class ReactTextInlineImageShadowNode : LayoutShadowNode() {
|
||||
/**
|
||||
* Build a [TextInlineImageSpan] from this node. This will be added to the TextView in place of
|
||||
|
||||
Reference in New Issue
Block a user