From cbb2dcc760b3698a93bb09313328e511263ccd9f Mon Sep 17 00:00:00 2001 From: Claes65 Date: Wed, 25 Oct 2023 09:12:43 +0200 Subject: [PATCH 1/2] Update MessageProgressMonitor.java --- .../java/org/amshove/natls/progress/MessageProgressMonitor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java b/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java index c3b55d51e..2441946c2 100644 --- a/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java +++ b/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java @@ -21,6 +21,7 @@ public void progress(String message, int percentage) { // for client messages, only show every tenth entry to reduce spam client.showMessage(ClientMessage.log("%d%% %s".formatted(percentage, message))); + lastTenthPercentage = (int) (percentage / 10); } } From 4661f3b1cf23a45262782c91dec8865c202b2cca Mon Sep 17 00:00:00 2001 From: Claes65 Date: Wed, 25 Oct 2023 09:46:46 +0200 Subject: [PATCH 2/2] no casting --- .../java/org/amshove/natls/progress/MessageProgressMonitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java b/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java index 2441946c2..275249c9d 100644 --- a/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java +++ b/libs/natls/src/main/java/org/amshove/natls/progress/MessageProgressMonitor.java @@ -21,7 +21,7 @@ public void progress(String message, int percentage) { // for client messages, only show every tenth entry to reduce spam client.showMessage(ClientMessage.log("%d%% %s".formatted(percentage, message))); - lastTenthPercentage = (int) (percentage / 10); + lastTenthPercentage = percentage / 10; } }