mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 11:41:28 +01:00
Fix blank string issue when time betwen 0 and 1000 miliseconds
This commit is contained in:
parent
24bd582501
commit
4af95e794b
@ -92,7 +92,7 @@ public class Methods {
|
|||||||
|
|
||||||
public static String makeReadable(Long time) {
|
public static String makeReadable(Long time) {
|
||||||
if (time == null)
|
if (time == null)
|
||||||
return "";
|
return "1s";
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
@ -109,6 +109,8 @@ public class Methods {
|
|||||||
sb.append(" ").append(minutes).append("m");
|
sb.append(" ").append(minutes).append("m");
|
||||||
if (seconds != 0L)
|
if (seconds != 0L)
|
||||||
sb.append(" ").append(seconds).append("s");
|
sb.append(" ").append(seconds).append("s");
|
||||||
|
if (sb.length() == 0)
|
||||||
|
sb.append("1s");
|
||||||
return sb.toString().trim();
|
return sb.toString().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user