From 7ed2fa4cb2a427c7c1f4319539235208f7b27feb Mon Sep 17 00:00:00 2001 From: Tongfei Chen Date: Sun, 24 Mar 2024 00:27:30 -0700 Subject: [PATCH] formatting --- .../me/tongfei/progressbar/ProgressBarBuilder.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/tongfei/progressbar/ProgressBarBuilder.java b/src/main/java/me/tongfei/progressbar/ProgressBarBuilder.java index 6eb2c53..7c6d035 100644 --- a/src/main/java/me/tongfei/progressbar/ProgressBarBuilder.java +++ b/src/main/java/me/tongfei/progressbar/ProgressBarBuilder.java @@ -136,11 +136,17 @@ public ProgressBar build() { clearDisplayOnFinish, processed, elapsed, - renderer == null ? new DefaultProgressBarRenderer( - style, unitName, unitSize, + (renderer == null + ? new DefaultProgressBarRenderer( + style, unitName, unitSize, showSpeed, speedFormat, speedUnit, - !hideEta, eta), - consumer == null ? Util.createConsoleConsumer(maxRenderedLength) : consumer + !hideEta, eta) + : renderer + ), + (consumer == null + ? Util.createConsoleConsumer(maxRenderedLength) + : consumer + ) ); } }