Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Duration after which automatic checkout happens, should not count dow…
Browse files Browse the repository at this point in the history
…n (EXPOSUREAPP-6254) (#2796)

Co-authored-by: Mohamed <mohamed.metwalli@sap.com>
Co-authored-by: harambasicluka <64483219+harambasicluka@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 12, 2021
1 parent 048d5e4 commit a09d78f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a09d78f

Please sign in to comment.