Small cleanup in WorkerInfoScreen

This commit is contained in:
AntsyLich 2024-02-17 03:29:15 +06:00
parent e183cbb231
commit 5aec8f8018
No known key found for this signature in database

View file

@ -150,19 +150,16 @@ class WorkerInfoScreen : Screen() {
} }
appendLine("State: ${workInfo.state}") appendLine("State: ${workInfo.state}")
if (workInfo.state == WorkInfo.State.ENQUEUED) { if (workInfo.state == WorkInfo.State.ENQUEUED) {
appendLine( val timestamp = LocalDateTime.ofInstant(
"Next scheduled run: ${ Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis),
LocalDateTime.ofInstant( ZoneId.systemDefault(),
Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis),
ZoneId.systemDefault(),
)
.toDateTimestampString(
UiPreferences.dateFormat(
Injekt.get<UiPreferences>().dateFormat().get(),
),
)
}",
) )
.toDateTimestampString(
UiPreferences.dateFormat(
Injekt.get<UiPreferences>().dateFormat().get(),
),
)
appendLine("Next scheduled run: $timestamp",)
appendLine("Attempt #${workInfo.runAttemptCount + 1}") appendLine("Attempt #${workInfo.runAttemptCount + 1}")
} }
appendLine() appendLine()