player/helper/PlayerHelper#getTimeString replace ints with longs

Duration data in the player code incosnistently typed. Half code
uses ints and half uses longs. Recieve longs in this function to
allow both halfs of player code just use the function without
nasty long to int downcasting warnings/errors in code
This commit is contained in:
Yevhen Babiichuk (DustDFG) 2026-01-28 20:25:47 +02:00
parent cc32a9a637
commit 10d4464b99

View file

@ -87,11 +87,11 @@ public final class PlayerHelper {
}
@NonNull
public static String getTimeString(final int milliSeconds) {
final int seconds = (milliSeconds % 60000) / 1000;
final int minutes = (milliSeconds % 3600000) / 60000;
final int hours = (milliSeconds % 86400000) / 3600000;
final int days = (milliSeconds % (86400000 * 7)) / 86400000;
public static String getTimeString(final long milliSeconds) {
final long seconds = (milliSeconds % 60000) / 1000;
final long minutes = (milliSeconds % 3600000) / 60000;
final long hours = (milliSeconds % 86400000) / 3600000;
final long days = (milliSeconds % (86400000 * 7)) / 86400000;
final Formatters formatters = FORMATTERS_PROVIDER.formatters();
if (days > 0) {