From b8b7397abe7d9778381fb1cb433c9b2f56ff37bc Mon Sep 17 00:00:00 2001 From: "jan.mikulik" Date: Tue, 30 Jan 2024 15:07:14 +0100 Subject: [PATCH] Don't draw section if amount is zero --- library/src/main/kotlin/app/futured/donut/DonutProgressView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/kotlin/app/futured/donut/DonutProgressView.kt b/library/src/main/kotlin/app/futured/donut/DonutProgressView.kt index e979638..6688c1d 100644 --- a/library/src/main/kotlin/app/futured/donut/DonutProgressView.kt +++ b/library/src/main/kotlin/app/futured/donut/DonutProgressView.kt @@ -260,7 +260,7 @@ class DonutProgressView @JvmOverloads constructor( assertDataConsistency(sections) sections - .filter { it.amount >= 0f } + .filter { it.amount > 0f } .forEach { section -> val newLineColor = section.color if (hasEntriesForSection(section.name).not()) {