From 3b8e03e94d995607af3d5565e1ae4bedb3d4f5f6 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Thu, 21 Sep 2023 05:10:03 -0700 Subject: [PATCH] fix open source Summary: these constants are not in the latest release and has broken the build Reviewed By: adityasharat Differential Revision: D49455455 fbshipit-source-id: d84b3d214907de197e166130d1c8911a5e0db3c2 --- .../plugins/uidebugger/litho/UIDebuggerLithoSupport.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/android/plugins/litho/src/main/java/com/facebook/flipper/plugins/uidebugger/litho/UIDebuggerLithoSupport.kt b/android/plugins/litho/src/main/java/com/facebook/flipper/plugins/uidebugger/litho/UIDebuggerLithoSupport.kt index 4af995a93..cc7bc3cfb 100644 --- a/android/plugins/litho/src/main/java/com/facebook/flipper/plugins/uidebugger/litho/UIDebuggerLithoSupport.kt +++ b/android/plugins/litho/src/main/java/com/facebook/flipper/plugins/uidebugger/litho/UIDebuggerLithoSupport.kt @@ -20,7 +20,6 @@ import com.facebook.litho.MatrixDrawable import com.facebook.litho.debug.LithoDebugEvent import com.facebook.litho.widget.TextDrawable import com.facebook.rendercore.debug.DebugEvent -import com.facebook.rendercore.debug.DebugEventAttribute import com.facebook.rendercore.debug.DebugEventBus import com.facebook.rendercore.debug.DebugEventSubscriber import com.facebook.rendercore.debug.DebugMarkerEvent @@ -78,13 +77,16 @@ object UIDebuggerLithoSupport { val treeId = event.renderStateId.toIntOrNull() ?: -1 val globalKey = - event.attributeOrNull(DebugEventAttribute.Key)?.let { + event.attributeOrNull("key")?.let { DebugComponent.generateGlobalKey(treeId, it).hashCode() } - val duration = event.attributeOrNull(DebugEventAttribute.Duration) + val duration = event.attributeOrNull("duration") val attributes = mutableMapOf() - val source = event.attributeOrNull(DebugEventAttribute.Source) + val source = + event.attributeOrNull( + "source") // todo replace magic strings with DebugEventAttribute.Source once + // litho open source is released if (source != null) { attributes["source"] = source }