maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

The time displayed is wrong with HH_MM formating #48

Closed fivez closed 3 years ago

fivez commented 3 years ago

Describe the bug When using the following code, the time displayed is incorrect :

TimeSheet().show(context) {
            title(title)
            currentTime(TimeUnit.HOURS.toSeconds(0).plus(TimeUnit.MINUTES.toSeconds(50)))
            format(TimeFormat.HH_MM)
            onPositive { durationTimeInSeconds: Long ->
                // Handle selected time
            }
            onNegative {
            }
        }

Library Version: 2.0.0

To Reproduce Steps to reproduce the behavior:

  1. By using the above displayed code, the time displayed is not 00h50m but 50h00m.

Expected behavior

  1. By using the above displayed code, the time displayed would be 00h50m.

Screenshots

Affected Device(s):

Additional context

fivez commented 3 years ago

Thanks!

maxkeppeler commented 3 years ago

No problem, thanks for reporting - shouldn't have happened in the first place.