Skip to content
Snippets Groups Projects
Unverified Commit 30dafeb0 authored by Matthias Urhahn's avatar Matthias Urhahn Committed by GitHub
Browse files

Increase auto-checkout text granularity (display minutes) (EXPOSUREAPP-6331) (#2811)

parent b579c23e
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ import de.rki.coronawarnapp.util.TimeAndDateExtensions.toUserTimeZone ...@@ -9,6 +9,7 @@ import de.rki.coronawarnapp.util.TimeAndDateExtensions.toUserTimeZone
import de.rki.coronawarnapp.util.list.SwipeConsumer import de.rki.coronawarnapp.util.list.SwipeConsumer
import de.rki.coronawarnapp.util.lists.diffutil.HasPayloadDiffer import de.rki.coronawarnapp.util.lists.diffutil.HasPayloadDiffer
import org.joda.time.Duration import org.joda.time.Duration
import org.joda.time.DurationFieldType
import org.joda.time.Instant import org.joda.time.Instant
import org.joda.time.PeriodType import org.joda.time.PeriodType
import org.joda.time.format.DateTimeFormat import org.joda.time.format.DateTimeFormat
...@@ -55,7 +56,9 @@ class ActiveCheckInVH(parent: ViewGroup) : ...@@ -55,7 +56,9 @@ class ActiveCheckInVH(parent: ViewGroup) :
checkoutInfo.text = run { checkoutInfo.text = run {
val checkoutIn = Duration(curItem.checkin.checkInStart, curItem.checkin.checkInEnd).let { val checkoutIn = Duration(curItem.checkin.checkInStart, curItem.checkin.checkInEnd).let {
val periodType = when { val periodType = when {
it.isLongerThan(Duration.standardHours(1)) -> PeriodType.hours() it.isLongerThan(Duration.standardHours(1)) -> PeriodType.forFields(
arrayOf(DurationFieldType.hours(), DurationFieldType.minutes())
)
it.isLongerThan(Duration.standardDays(1)) -> PeriodType.days() it.isLongerThan(Duration.standardDays(1)) -> PeriodType.days()
else -> PeriodType.minutes() else -> PeriodType.minutes()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment