From 16a3e2fa275c51de3d38d1315410a74aeff261e0 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 18 Jun 2018 07:25:19 -0700 Subject: [PATCH] Rename `isInternalComponent` to `canResolve` Summary: I'm sure there's a better way to describe what this does in the Javadoc, but I can't really come up with one. Also inlined one method which made another call which is now redundant. I'd also really like to make this call entirely unnecessary by moving the logic to `resolve()` so that overriding it automatically implies `canResolve` but the edge cases for commonProps and treeProps make this rather unpleasant. Reviewed By: IanChilds Differential Revision: D8476911 fbshipit-source-id: 33c6a20da03e50cd1c1d4994e64ef8b43b2c68bc --- .../inspector/litho-sonar/DebugComponentDescriptor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/plugins/inspector/litho-sonar/DebugComponentDescriptor.java b/android/plugins/inspector/litho-sonar/DebugComponentDescriptor.java index 39e2cdaa6..c29c96a86 100644 --- a/android/plugins/inspector/litho-sonar/DebugComponentDescriptor.java +++ b/android/plugins/inspector/litho-sonar/DebugComponentDescriptor.java @@ -18,7 +18,6 @@ import com.facebook.litho.ComponentContext; import com.facebook.litho.ComponentLifecycle; import com.facebook.litho.DebugComponent; import com.facebook.litho.DebugLayoutNode; -import com.facebook.litho.EventHandler; import com.facebook.litho.LithoView; import com.facebook.litho.annotations.Prop; import com.facebook.litho.annotations.State; @@ -269,7 +268,7 @@ public class DebugComponentDescriptor extends NodeDescriptor { @Nullable private static SonarObject getPropData(DebugComponent node) { - if (node.isInternalComponent()) { + if (node.canResolve()) { return null; } @@ -328,7 +327,7 @@ public class DebugComponentDescriptor extends NodeDescriptor { @Nullable private static SonarObject getStateData(DebugComponent node) { - if (node.isInternalComponent()) { + if (node.canResolve()) { return null; }