Skip to content

Commit

Permalink
Remove getComponentsConfig method
Browse files Browse the repository at this point in the history
Summary: This method only has two usages - and we have to keep the `getLithoConfiguration` anyways, so we can retrieve it that way. We want to get the `ComponentContext` leaner.

Reviewed By: pentiumao

Differential Revision: D51199957

fbshipit-source-id: b2d57afd4481666222a05bcd40698c4f388b5dc5
  • Loading branch information
Fabio Carballo authored and facebook-github-bot committed Nov 11, 2023
1 parent bbd211b commit a65a680
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,6 @@ public LithoConfiguration getLithoConfiguration() {
return mLithoConfiguration;
}

ComponentsConfiguration getComponentsConfiguration() {
return mLithoConfiguration.componentsConfig;
}

/**
* Notify the Component Tree that it needs to synchronously perform a state update.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ object LithoReducer {
result,
type,
unit.importantForAccessibility,
layoutState.resolveResult.context.componentsConfiguration
layoutState.resolveResult.context.lithoConfiguration.componentsConfig
.shouldAddRootHostViewOrDisableBgFgOutputs())

if (attrs != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LithoRenderTreeView @JvmOverloads constructor(context: Context, attrs: Att
}

override fun getConfiguration(): ComponentsConfiguration? {
return layoutState?.componentContext?.componentsConfiguration
return layoutState?.componentContext?.lithoConfiguration?.componentsConfig
}

override fun isIncrementalMountEnabled(): Boolean {
Expand Down

0 comments on commit a65a680

Please sign in to comment.