Skip to content

Commit

Permalink
chore(storage-viewer): don't render arc if total size is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
logickoder committed Nov 3, 2023
1 parent 91ddd42 commit c46266d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ fun CumulativeStorage(
Canvas(
modifier = Modifier.aspectRatio(1f),
onDraw = {
// don't bother with drawing anything if there's no data
if (totalSize == 0f) return@Canvas

val totalAngle = 180f
var currentAngle = 0f
rotate(180f) {
Expand Down

0 comments on commit c46266d

Please sign in to comment.