mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Don't show date twice
This commit is contained in:
parent
9857ff943e
commit
3b42210f10
2 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ import androidx.work.WorkInfo
|
||||||
import androidx.work.WorkManager
|
import androidx.work.WorkManager
|
||||||
import androidx.work.WorkQuery
|
import androidx.work.WorkQuery
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BaseCoroutinePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BaseCoroutinePresenter
|
||||||
import eu.kanade.tachiyomi.util.lang.toDateTimeTimestampString
|
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
||||||
import kotlinx.coroutines.flow.SharingStarted
|
import kotlinx.coroutines.flow.SharingStarted
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import kotlinx.coroutines.flow.stateIn
|
import kotlinx.coroutines.flow.stateIn
|
||||||
|
@ -68,8 +68,8 @@ class WorkerInfoPresenter : BaseCoroutinePresenter<WorkerInfoController>() {
|
||||||
Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis),
|
Instant.ofEpochMilli(workInfo.nextScheduleTimeMillis),
|
||||||
ZoneId.systemDefault(),
|
ZoneId.systemDefault(),
|
||||||
)
|
)
|
||||||
.toDateTimeTimestampString(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT))
|
.toDateTimestampString(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT))
|
||||||
appendLine("Next scheduled run: $timestamp",)
|
appendLine("Next scheduled run: $timestamp")
|
||||||
appendLine("Attempt #${workInfo.runAttemptCount + 1}")
|
appendLine("Attempt #${workInfo.runAttemptCount + 1}")
|
||||||
}
|
}
|
||||||
appendLine()
|
appendLine()
|
||||||
|
|
|
@ -6,9 +6,9 @@ import java.time.format.DateTimeFormatter
|
||||||
import java.time.format.FormatStyle
|
import java.time.format.FormatStyle
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
fun LocalDateTime.toDateTimeTimestampString(dateTimeFormatter: DateTimeFormatter): String {
|
fun LocalDateTime.toDateTimestampString(dateTimeFormatter: DateTimeFormatter): String {
|
||||||
val date = dateTimeFormatter.format(this)
|
val date = dateTimeFormatter.format(this)
|
||||||
val time = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT).format(this)
|
val time = DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT).format(this)
|
||||||
return "$date $time"
|
return "$date $time"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue