From 4af95e794bf2f718fba64c42869ffb8ccc29ab03 Mon Sep 17 00:00:00 2001 From: ceze88 Date: Wed, 25 Jan 2023 16:45:16 +0100 Subject: [PATCH] Fix blank string issue when time betwen 0 and 1000 miliseconds --- src/main/java/com/songoda/ultimatekits/utils/Methods.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/ultimatekits/utils/Methods.java b/src/main/java/com/songoda/ultimatekits/utils/Methods.java index 8161fff..c90e51b 100644 --- a/src/main/java/com/songoda/ultimatekits/utils/Methods.java +++ b/src/main/java/com/songoda/ultimatekits/utils/Methods.java @@ -92,7 +92,7 @@ public class Methods { public static String makeReadable(Long time) { if (time == null) - return ""; + return "1s"; StringBuilder sb = new StringBuilder(); @@ -109,6 +109,8 @@ public class Methods { sb.append(" ").append(minutes).append("m"); if (seconds != 0L) sb.append(" ").append(seconds).append("s"); + if (sb.length() == 0) + sb.append("1s"); return sb.toString().trim(); }