@@ -32,11 +32,9 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity {
3232 super .onCreate(savedInstanceState)
3333 var mainComponentName: String? = null
3434 var launchOptions: Bundle ? = null
35- var fabricEnabled = false
3635 arguments?.let { args ->
3736 mainComponentName = args.getString(ARG_COMPONENT_NAME )
3837 launchOptions = args.getBundle(ARG_LAUNCH_OPTIONS )
39- fabricEnabled = args.getBoolean(ARG_FABRIC_ENABLED )
4038 @Suppress(" DEPRECATION" )
4139 disableHostLifecycleEvents = args.getBoolean(ARG_DISABLE_HOST_LIFECYCLE_EVENTS )
4240 }
@@ -52,7 +50,6 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity {
5250 reactNativeHost,
5351 mainComponentName,
5452 launchOptions,
55- fabricEnabled,
5653 )
5754 }
5855 }
@@ -176,7 +173,6 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity {
176173 public class Builder {
177174 public var componentName: String? = null
178175 public var launchOptions: Bundle ? = null
179- public var fabricEnabled: Boolean = false
180176
181177 /* *
182178 * Set the Component name for our React Native instance.
@@ -200,21 +196,12 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity {
200196 return this
201197 }
202198
203- public fun build (): ReactFragment = newInstance(componentName, launchOptions, fabricEnabled)
204-
205- @Deprecated(
206- " You should not change call ReactFragment.setFabricEnabled. Instead enable the NewArchitecture for the whole application with newArchEnabled=true in your gradle.properties file"
207- )
208- public fun setFabricEnabled (fabricEnabled : Boolean ): Builder {
209- this .fabricEnabled = fabricEnabled
210- return this
211- }
199+ public fun build (): ReactFragment = newInstance(componentName, launchOptions)
212200 }
213201
214202 public companion object {
215203 protected const val ARG_COMPONENT_NAME : String = " arg_component_name"
216204 protected const val ARG_LAUNCH_OPTIONS : String = " arg_launch_options"
217- protected const val ARG_FABRIC_ENABLED : String = " arg_fabric_enabled"
218205
219206 @Deprecated(
220207 " We will remove this and use a different solution for handling Fragment lifecycle events."
@@ -225,19 +212,16 @@ public open class ReactFragment : Fragment(), PermissionAwareActivity {
225212 /* *
226213 * @param componentName The name of the react native component
227214 * @param launchOptions The launch options for the react native component
228- * @param fabricEnabled Flag to enable Fabric for ReactFragment
229215 * @return A new instance of fragment ReactFragment.
230216 */
231217 private fun newInstance (
232218 componentName : String? ,
233219 launchOptions : Bundle ? ,
234- fabricEnabled : Boolean ,
235220 ): ReactFragment {
236221 val args =
237222 Bundle ().apply {
238223 putString(ARG_COMPONENT_NAME , componentName)
239224 putBundle(ARG_LAUNCH_OPTIONS , launchOptions)
240- putBoolean(ARG_FABRIC_ENABLED , fabricEnabled)
241225 }
242226 return ReactFragment ().apply { setArguments(args) }
243227 }
0 commit comments