mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-11 18:02:35 +01:00
Fixed another case
This commit is contained in:
parent
e6dfe7309c
commit
74f024506b
@ -121,6 +121,8 @@ public class FormatUtils {
|
|||||||
String m = Settings.FORMAT_MINUTES.toString().replace("%minutes%", String.valueOf(minutes));
|
String m = Settings.FORMAT_MINUTES.toString().replace("%minutes%", String.valueOf(minutes));
|
||||||
if (hours == 0 && m.contains("%hours%")) {
|
if (hours == 0 && m.contains("%hours%")) {
|
||||||
m = m.replace("%hours%", Settings.FORMAT_MINUTES.toString().replace("%zero%", "0") + "0");
|
m = m.replace("%hours%", Settings.FORMAT_MINUTES.toString().replace("%zero%", "0") + "0");
|
||||||
|
} else {
|
||||||
|
m = m.replace("%hours", "");
|
||||||
}
|
}
|
||||||
if (m.contains("%zero%") && String.valueOf(minutes).length() == 1) {
|
if (m.contains("%zero%") && String.valueOf(minutes).length() == 1) {
|
||||||
builder.append('0');
|
builder.append('0');
|
||||||
@ -131,6 +133,8 @@ public class FormatUtils {
|
|||||||
String s = Settings.FORMAT_SECONDS.toString().replace("%seconds%", String.valueOf(seconds));
|
String s = Settings.FORMAT_SECONDS.toString().replace("%seconds%", String.valueOf(seconds));
|
||||||
if (minutes == 0 && s.contains("%minutes%")) {
|
if (minutes == 0 && s.contains("%minutes%")) {
|
||||||
s = s.replace("%minutes%", Settings.FORMAT_MINUTES.toString().replace("%hours", "").replace("%zero%", "0") + 0);
|
s = s.replace("%minutes%", Settings.FORMAT_MINUTES.toString().replace("%hours", "").replace("%zero%", "0") + 0);
|
||||||
|
} else {
|
||||||
|
s = s.replace("%minutes%", "");
|
||||||
}
|
}
|
||||||
if (s.contains("%zero%") && String.valueOf(seconds).length() == 1) {
|
if (s.contains("%zero%") && String.valueOf(seconds).length() == 1) {
|
||||||
builder.append('0');
|
builder.append('0');
|
||||||
|
Loading…
Reference in New Issue
Block a user