Skip to content

Commit 7f0b6ab

Browse files
authored
Fix inlay text shows unstable in the recomposition live heatmap (#131)
1 parent 73fdc27 commit 7f0b6ab

File tree

1 file changed

+6
-2
lines changed
  • compose-stability-analyzer-idea/src/main/kotlin/com/skydoves/compose/stability/idea/heatmap

1 file changed

+6
-2
lines changed

compose-stability-analyzer-idea/src/main/kotlin/com/skydoves/compose/stability/idea/heatmap/HeatmapInlayManager.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,12 @@ internal class HeatmapInlayManager(
244244
val count = data.totalRecompositionCount
245245
append("$count recomposition")
246246
if (count != 1) append("s")
247-
if (data.unstableParameters.isNotEmpty()) {
248-
append(" | unstable: ${data.unstableParameters.joinToString(", ")}")
247+
if (data.changedParameters.isNotEmpty()) {
248+
val topChanged = data.changedParameters.entries
249+
.sortedByDescending { it.value }
250+
.take(3)
251+
.joinToString(", ") { it.key }
252+
append(" | changed: $topChanged")
249253
}
250254
}
251255
}

0 commit comments

Comments
 (0)