Skip to content

Commit

Permalink
Fix spacing between component table and added/removed items (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton authored Feb 15, 2024
1 parent ef192fb commit 4151e7b
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ internal fun StringBuilder.appendComponentDiff(name: String, diff: ComponentDiff
row(diff.oldCount, diff.newCount, "$diffSize ($addedSize $removedSize)")
}.renderText(),
)
diff.added.forEach {
appendLine("+ $it")
}
if (diff.added.isNotEmpty() && diff.removed.isNotEmpty()) {
if (diff.added.isNotEmpty()) {
appendLine()
diff.added.forEach {
appendLine("+ $it")
}
}
diff.removed.forEach {
appendLine("- $it")
if (diff.removed.isNotEmpty()) {
appendLine()
diff.removed.forEach {
appendLine("- $it")
}
}
}.prependIndent(" "),
)
Expand Down

0 comments on commit 4151e7b

Please sign in to comment.