Cleaned up excess code in TimeUtils

This commit is contained in:
darbyjack 2019-05-08 22:19:57 -05:00
parent 62e282cc0e
commit 111f5462fc
No known key found for this signature in database
GPG Key ID: 392E68B2FE0ED3E5

View File

@ -27,9 +27,7 @@ public class TimeUtil {
if (seconds < 60) {
switch (type) {
case DAYS:
return "0";
case HOURS:
return "0";
case MINUTES:
return "0";
case SECONDS:
@ -44,7 +42,6 @@ public class TimeUtil {
if (minutes < 60) {
switch (type) {
case DAYS:
return "0";
case HOURS:
return "0";
case MINUTES:
@ -118,9 +115,9 @@ public class TimeUtil {
int secondsLeft = seconds - s;
if (minutes < 60) {
if (secondsLeft > 0) {
return String.valueOf(minutes + "m " + secondsLeft + "s");
return minutes + "m " + secondsLeft + "s";
} else {
return String.valueOf(minutes + "m");
return minutes + "m";
}
}
if (minutes < 1440) {