Fix orbit clock showing 12 as 0 in 12-hour clock format

Fix #472
This commit is contained in:
MM20 2023-07-21 14:18:01 +02:00
parent 53ac49e4fb
commit c4609c2c66
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -64,9 +64,9 @@ fun OrbitClock(
val formattedHour = (
if (DateFormat.is24HourFormat(LocalContext.current))
hour
else
hour % 12
).toString()
else {
((hour + 11) % 12) + 1
}).toString()
val secsAngleStart = second / 60f * Float.TWO_PI
val minsAngleStart = minute / 60f * Float.TWO_PI + secsAngleStart / 60f