Skip to content

Commit e77abf8

Browse files
committed
[SHARED] Fix issue with DraggableBox edge case
1 parent 484ec75 commit e77abf8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

buildSrc/src/main/java/AndroidVersions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ object AndroidVersions {
55
const val COMPILE_SDK = 35
66

77
private const val VERSION_MAJOR = 6
8-
private const val VERSION_MINOR = 2
9-
private const val VERSION_PATCH = 0
8+
private const val VERSION_MINOR = 1
9+
private const val VERSION_PATCH = 1
1010

1111
const val VERSION_CODE = VERSION_MAJOR * 10000 + VERSION_MINOR * 100 + VERSION_PATCH
1212
const val VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"

shared/src/commonMain/kotlin/com/kgurgul/cpuinfo/ui/components/DraggableBox.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private fun calculateElevation(
110110
actionRowOffset: Float,
111111
maxElevation: Dp = 8.dp
112112
): Dp {
113-
return if (offset.absoluteValue == 0f) {
113+
return if (offset.isNaN() || actionRowOffset.isNaN() || offset.absoluteValue == 0f) {
114114
0.dp
115115
} else {
116116
(offset.absoluteValue * 100f / actionRowOffset.absoluteValue) / 100f * maxElevation

0 commit comments

Comments
 (0)