From d7f8ed5d81846ba29fbeb94ff83cfba5c94a6863 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Tue, 19 Sep 2023 06:14:25 -0700 Subject: [PATCH] Fix broken attribution of mount events Summary: The string were out of sync so using the constants instead Reviewed By: fabiocarballo Differential Revision: D49414046 fbshipit-source-id: 5d61831505e5d7ecec3d5c9717d4549ba4b291a8 --- .../plugins/uidebugger/litho/UIDebuggerLithoSupport.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 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 61c7aae7a..4af995a93 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,6 +20,7 @@ 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 @@ -77,13 +78,13 @@ object UIDebuggerLithoSupport { val treeId = event.renderStateId.toIntOrNull() ?: -1 val globalKey = - event.attributeOrNull("Key")?.let { + event.attributeOrNull(DebugEventAttribute.Key)?.let { DebugComponent.generateGlobalKey(treeId, it).hashCode() } - val duration = event.attributeOrNull("duration") + val duration = event.attributeOrNull(DebugEventAttribute.Duration) val attributes = mutableMapOf() - val source = event.attributeOrNull("source") + val source = event.attributeOrNull(DebugEventAttribute.Source) if (source != null) { attributes["source"] = source }