aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
index 9118ac6a2..aca78fd0a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
@@ -74,7 +74,7 @@ enum class ItemAbility(
} else {
duration /= 1000
duration++
- LorenzUtils.formatInteger(duration.toInt())
+ LorenzUtils.formatInteger(duration)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 043978277..9d783ce86 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -117,7 +117,9 @@ object LorenzUtils {
fun formatPercentage(percentage: Double, format: String?): String =
DecimalFormat(format).format(percentage * 100).replace(',', '.') + "%"
- fun formatInteger(i: Int): String = DecimalFormat("#,##0").format(i.toLong()).replace(',', '.')
+ fun formatInteger(i: Int): String = formatInteger(i.toLong())
+
+ fun formatInteger(l: Long): String = DecimalFormat("#,##0").format(l).replace(',', '.')
fun formatDouble(d: Double, format: String?): String =
DecimalFormat(format).format(d).replace(',', 'x').replace('.', ',').replace('x', '.')