Skip to content

Commit

Permalink
Merge pull request #2 from presswink/swipe-to-dismiss-issue
Browse files Browse the repository at this point in the history
swipe to dismiss issue fixed for real devices
  • Loading branch information
Adityapanther authored Mar 19, 2024
2 parents dec2e5a + 4fbb8bf commit 030c998
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions swiper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ afterEvaluate {
create<MavenPublication>("release") {
groupId = "moe.tlaster"
artifactId = "swiper"
version = "0.8.0"

version = "0.8.1"
from(components["release"])
}
}
Expand Down
2 changes: 1 addition & 1 deletion swiper/src/main/java/moe/tlaster/swiper/SwiperState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SwiperState(
internal suspend fun fling(velocity: Float) {
val value = _offset.value
val calcCurrentHeight = abs(value) / 1000
if(velocity.absoluteValue == 0.0f && calcCurrentHeight > dismissHeight){
if(velocity.absoluteValue >= 0.0f && calcCurrentHeight > dismissHeight){
when {
_direction == Direction.Up && value < 0.0 -> {
dismiss(velocity)
Expand Down

0 comments on commit 030c998

Please sign in to comment.