From c1533a6306586d16dd8a12212ac58980e67eaef2 Mon Sep 17 00:00:00 2001 From: Michal Karpinski Date: Tue, 5 Sep 2023 04:45:39 -0700 Subject: [PATCH] Remove SpecGeneratedComponent.canResolve() Summary: This parrot is dead... Reviewed By: adityasharat Differential Revision: D48924332 fbshipit-source-id: 6dfbaa738eaab16ac4afd60e2469ccd528ad615a --- litho-core/src/main/java/com/facebook/litho/Column.kt | 2 -- litho-core/src/main/java/com/facebook/litho/Row.kt | 2 -- .../java/com/facebook/litho/SpecGeneratedComponent.java | 8 -------- litho-core/src/main/java/com/facebook/litho/Wrapper.java | 5 ----- 4 files changed, 17 deletions(-) diff --git a/litho-core/src/main/java/com/facebook/litho/Column.kt b/litho-core/src/main/java/com/facebook/litho/Column.kt index a0c1c5f87d..cab910a52a 100644 --- a/litho-core/src/main/java/com/facebook/litho/Column.kt +++ b/litho-core/src/main/java/com/facebook/litho/Column.kt @@ -48,8 +48,6 @@ private constructor( children: MutableList? = null ) : this(null, alignContent, alignItems, justifyContent, wrap, reverse, children) - override fun canResolve(): Boolean = true - public override fun resolve(resolveContext: ResolveContext, c: ComponentContext): LithoNode? { val node = LithoNode() node.flexDirection(if (reverse) YogaFlexDirection.COLUMN_REVERSE else YogaFlexDirection.COLUMN) diff --git a/litho-core/src/main/java/com/facebook/litho/Row.kt b/litho-core/src/main/java/com/facebook/litho/Row.kt index d5434c4db7..943765f145 100644 --- a/litho-core/src/main/java/com/facebook/litho/Row.kt +++ b/litho-core/src/main/java/com/facebook/litho/Row.kt @@ -48,8 +48,6 @@ private constructor( children: MutableList? = null ) : this(null, alignContent, alignItems, justifyContent, wrap, reverse, children) - override fun canResolve(): Boolean = true - public override fun resolve(resolveContext: ResolveContext, c: ComponentContext): LithoNode? { val node = LithoNode() node.flexDirection(if (reverse) YogaFlexDirection.ROW_REVERSE else YogaFlexDirection.ROW) diff --git a/litho-core/src/main/java/com/facebook/litho/SpecGeneratedComponent.java b/litho-core/src/main/java/com/facebook/litho/SpecGeneratedComponent.java index 954756b1cb..594ddc2847 100644 --- a/litho-core/src/main/java/com/facebook/litho/SpecGeneratedComponent.java +++ b/litho-core/src/main/java/com/facebook/litho/SpecGeneratedComponent.java @@ -239,14 +239,6 @@ protected final PrepareResult prepare(ResolveContext resolveContext, ComponentCo return null; } - /** - * Indicate that this component implements its own {@link #resolve(LithoLayoutContext, - * ComponentContext)} logic instead of going through {@link #render(ComponentContext)}. - */ - boolean canResolve() { - return false; - } - @Override protected ComponentResolveResult resolve( final ResolveContext resolveContext, diff --git a/litho-core/src/main/java/com/facebook/litho/Wrapper.java b/litho-core/src/main/java/com/facebook/litho/Wrapper.java index fec57fd153..0d6b6e8de8 100644 --- a/litho-core/src/main/java/com/facebook/litho/Wrapper.java +++ b/litho-core/src/main/java/com/facebook/litho/Wrapper.java @@ -33,11 +33,6 @@ private Wrapper() { super("Wrapper"); } - @Override - protected boolean canResolve() { - return true; - } - public static Builder create(ComponentContext context) { return create(context, 0, 0); }