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

Duration after which automatic checkout happens, should not count down (EXPOSUREAPP-6254) (#2796)

parent 048d5e4a
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
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