aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-23 13:40:31 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-23 13:40:31 +0200
commita40b447b792d5e09b2afab754a87cc50d5e2ee47 (patch)
tree5b7b1734d04e4eb06ee0b419793ee2e79d28b081 /src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
parentd060394ccd00fbe3a86481db939032e13ca458b2 (diff)
downloadskyhanni-a40b447b792d5e09b2afab754a87cc50d5e2ee47.tar.gz
skyhanni-a40b447b792d5e09b2afab754a87cc50d5e2ee47.tar.bz2
skyhanni-a40b447b792d5e09b2afab754a87cc50d5e2ee47.zip
added minion removal support
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
index ea88f8eb8..55c87c3a8 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
@@ -52,20 +52,16 @@ object StringUtils {
val formatSeconds = durationFormat.format(sec)
if (days > 0) {
- return "" + days + "d " + formatHours + ":" + formatMinutes + ":" + formatSeconds
+ return "${days}d $formatHours:$formatMinutes:$formatSeconds ago"
}
if (hours > 0) {
- return "$formatHours:$formatMinutes:$formatSeconds"
+ return "$formatHours:$formatMinutes:$formatSeconds ago"
}
if (minutes > 0) {
- return "$formatMinutes:$formatSeconds"
+ return "$formatMinutes:$formatSeconds ago"
}
if (sec > 0) {
- return if (sec == 1L) {
- "$formatSeconds second"
- } else {
- "$formatSeconds seconds"
- }
+ return "${sec}s ago"
}
return "Now"