Skip to content

Commit 30af3c6

Browse files
committed
library: Bump version to 0.4.1
* Add major contributors * Fix a crash on K/N platform
1 parent 9a1a198 commit 30af3c6

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

convention-plugins/src/main/kotlin/module.publication.gradle.kts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ plugins {
33
signing
44
}
55

6+
val githubUrl = "https://github.com"
7+
val projectUrl = "$githubUrl/miuix-kotlin-multiplatform/miuix"
8+
69
publishing {
710
publications.withType<MavenPublication> {
811
// Stub javadoc.jar artifact
@@ -15,23 +18,37 @@ publishing {
1518
pom {
1619
name.set("miuix")
1720
description.set("A UI library for Compose MultiPlatform")
18-
url.set("https://github.com/miuix-kotlin-multiplatform/miuix")
19-
21+
url.set(projectUrl)
2022
licenses {
2123
license {
22-
name.set("Apache-2.0")
23-
url.set("https://github.com/miuix-kotlin-multiplatform/miuix/blob/main/LICENSE")
24+
name.set("The Apache Software License, Version 2.0")
25+
url.set("$projectUrl/blob/main/LICENSE")
2426
}
2527
}
28+
issueManagement {
29+
system.set("Github")
30+
url.set("$projectUrl/issues")
31+
}
32+
scm {
33+
connection.set("$projectUrl.git")
34+
url.set(projectUrl)
35+
}
2636
developers {
2737
developer {
2838
id.set("YuKongA")
2939
name.set("YuKongA")
30-
url.set("https://github.com/YuKongA")
40+
url.set("$githubUrl/YuKongA")
41+
}
42+
developer {
43+
id.set("HowieHChen")
44+
name.set("Howie")
45+
url.set("$githubUrl/HowieHChen")
46+
}
47+
developer {
48+
id.set("Voemp")
49+
name.set("Voemp")
50+
url.set("$githubUrl/Voemp")
3151
}
32-
}
33-
scm {
34-
url.set("https://github.com/miuix-kotlin-multiplatform/miuix")
3552
}
3653
}
3754
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
allprojects {
22
group = "top.yukonga.miuix.kmp"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
}

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/TopAppBar.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,10 @@ private fun TopAppBarLayout(
682682
val layoutHeight = lerp(
683683
start = collapsedHeight,
684684
stop = expandedHeight,
685-
fraction = 1f - (abs(scrolledOffset.offset()) / expandedHeightPx).coerceIn(0f, 1f)
685+
fraction = if (expandedHeightPx > 0f) {
686+
val offset = scrolledOffset.offset()
687+
if (offset.isNaN()) 1f else (1f - (abs(offset) / expandedHeightPx).coerceIn(0f, 1f))
688+
} else 1f
686689
).toFloat().roundToInt()
687690

688691
layout(constraints.maxWidth, layoutHeight) {

0 commit comments

Comments
 (0)