From a09d78f8788835a80958eb137a9e90a61c2bf658 Mon Sep 17 00:00:00 2001 From: Matthias Urhahn Date: Mon, 12 Apr 2021 11:15:26 +0200 Subject: [PATCH] Duration after which automatic checkout happens, should not count down (EXPOSUREAPP-6254) (#2796) Co-authored-by: Mohamed Co-authored-by: harambasicluka <64483219+harambasicluka@users.noreply.github.com> --- .../attendee/checkins/items/ActiveCheckInVH.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/attendee/checkins/items/ActiveCheckInVH.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/attendee/checkins/items/ActiveCheckInVH.kt index 4f91c74d8a1..d3600779ad9 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/attendee/checkins/items/ActiveCheckInVH.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/attendee/checkins/items/ActiveCheckInVH.kt @@ -53,8 +53,7 @@ class ActiveCheckInVH(parent: ViewGroup) : traceLocationCardHighlightView.setCaption(startDate.toString(DateTimeFormat.mediumDate())) checkoutInfo.text = run { - val checkoutAt = curItem.checkin.checkInEnd - val checkoutIn = Duration(Instant.now(), checkoutAt).let { + val checkoutIn = Duration(curItem.checkin.checkInStart, curItem.checkin.checkInEnd).let { val periodType = when { it.isLongerThan(Duration.standardHours(1)) -> PeriodType.hours() it.isLongerThan(Duration.standardDays(1)) -> PeriodType.days()