mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Delete ReactRawTextManager from codebase (#53947)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53947 ReactRawTextManager is legacy architecture and unused, let's delete it changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D83187075 fbshipit-source-id: 4e4f7feb3178b3f95a71ff805ec7d784f2811285
This commit is contained in:
1 parent
8386a9e4f1
commit
969e14271c
2 files changed
-57
No files matched your search
-3
@@ -147,7 +147,6 @@ constructor(private val config: MainPackageConfig? = null) :
|
||||
FrescoBasedReactTextInlineImageViewManager(),
|
||||
ReactImageManager(),
|
||||
ReactModalHostManager(),
|
||||
com.facebook.react.views.text.ReactRawTextManager(),
|
||||
ReactTextInputManager(),
|
||||
if (ReactNativeFeatureFlags.enablePreparedTextLayout()) PreparedLayoutTextViewManager()
|
||||
else ReactTextViewManager(),
|
||||
@@ -183,8 +182,6 @@ constructor(private val config: MainPackageConfig? = null) :
|
||||
ReactImageManager.REACT_CLASS to ModuleSpec.viewManagerSpec { ReactImageManager() },
|
||||
ReactModalHostManager.REACT_CLASS to
|
||||
ModuleSpec.viewManagerSpec { ReactModalHostManager() },
|
||||
com.facebook.react.views.text.ReactRawTextManager.REACT_CLASS to
|
||||
ModuleSpec.viewManagerSpec { com.facebook.react.views.text.ReactRawTextManager() },
|
||||
ReactTextInputManager.REACT_CLASS to
|
||||
ModuleSpec.viewManagerSpec { ReactTextInputManager() },
|
||||
ReactTextViewManager.REACT_CLASS to
|
||||
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.facebook.react.views.text
|
||||
|
||||
import android.view.View
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitecture
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
|
||||
import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
/**
|
||||
* Manages raw text nodes (aka `textContent` in terms of DOM). Since they are used only as a virtual
|
||||
* nodes, any type of native view operation will throw an [IllegalStateException].
|
||||
*/
|
||||
@ReactModule(name = ReactRawTextManager.REACT_CLASS)
|
||||
@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 class ReactRawTextManager : ViewManager<View, ReactRawTextShadowNode>() {
|
||||
|
||||
override fun getName(): String {
|
||||
return REACT_CLASS
|
||||
}
|
||||
|
||||
public override fun createViewInstance(context: ThemedReactContext): ReactTextView =
|
||||
throw IllegalStateException("Attempt to create a native view for RCTRawText")
|
||||
|
||||
override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View =
|
||||
throw IllegalStateException("Attempt to recycle a native view for RCTRawText")
|
||||
|
||||
override fun updateExtraData(view: View, extraData: Any): Unit = Unit
|
||||
|
||||
override fun getShadowNodeClass(): Class<ReactRawTextShadowNode> {
|
||||
return ReactRawTextShadowNode::class.java
|
||||
}
|
||||
|
||||
override fun createShadowNodeInstance(): ReactRawTextShadowNode {
|
||||
return ReactRawTextShadowNode()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
const val REACT_CLASS: String = "RCTRawText"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user