From 5aec8f8018236a38106483da08f9cbc28261ac9b Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:29:15 +0600 Subject: [PATCH] Small cleanup in `WorkerInfoScreen` --- .../settings/screen/debug/WorkerInfoScreen.kt | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt index dbe82830d..4a57103d8 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt @@ -150,19 +150,16 @@ class WorkerInfoScreen : Screen() { } appendLine("State: ${workInfo.state}") if (workInfo.state == WorkInfo.State.ENQUEUED) { - appendLine( - "Next scheduled run: ${ - LocalDateTime.ofInstant( - Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis), - ZoneId.systemDefault(), - ) - .toDateTimestampString( - UiPreferences.dateFormat( - Injekt.get().dateFormat().get(), - ), - ) - }", + val timestamp = LocalDateTime.ofInstant( + Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis), + ZoneId.systemDefault(), ) + .toDateTimestampString( + UiPreferences.dateFormat( + Injekt.get().dateFormat().get(), + ), + ) + appendLine("Next scheduled run: $timestamp",) appendLine("Attempt #${workInfo.runAttemptCount + 1}") } appendLine()