Skip to content

Commit

Permalink
Fix broken attribution of mount events
Browse files Browse the repository at this point in the history
Summary: The string were out of sync so using the constants instead

Reviewed By: fabiocarballo

Differential Revision: D49414046

fbshipit-source-id: 5d61831505e5d7ecec3d5c9717d4549ba4b291a8
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed Sep 19, 2023
1 parent b6f7d4c commit d7f8ed5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,13 +78,13 @@ object UIDebuggerLithoSupport {
val treeId = event.renderStateId.toIntOrNull() ?: -1

val globalKey =
event.attributeOrNull<String>("Key")?.let {
event.attributeOrNull<String>(DebugEventAttribute.Key)?.let {
DebugComponent.generateGlobalKey(treeId, it).hashCode()
}
val duration = event.attributeOrNull<Duration>("duration")
val duration = event.attributeOrNull<Duration>(DebugEventAttribute.Duration)

val attributes = mutableMapOf<String, String>()
val source = event.attributeOrNull<String>("source")
val source = event.attributeOrNull<String>(DebugEventAttribute.Source)
if (source != null) {
attributes["source"] = source
}
Expand Down

0 comments on commit d7f8ed5

Please sign in to comment.