Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ android {
applicationId = "com.kingzcheung.xime"
minSdk = 28
targetSdk = 35
versionCode = 20260827
versionName = "2.7.1"
versionCode = 20260828
versionName = "2.7.2"


testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,11 @@ fun SwipeableIconKeyButton(
isPressed = false
currentOnRelease?.invoke()
isLongPress = false
// 长按结束后必须重置:onTap 不会在长按后触发,
// 若残留 true 会吞掉下一次点击(退格键吃键)。
// onDragEnd/onDragCancel 虽也重置,但仅 drag 激活时触发,
// 长按无位移(drag 未激活)时走不到那里。
hasTriggeredLongPress = false
}
},
onTap = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,11 @@ fun SwipeableKeyButtonLandscape(
if (selected != null) {
currentOnLongPressSelect?.invoke(selected)
}
} else if (!swipeDetected && !dragActivated) {
} else if (!dragActivated) {
// 不能用 swipeDetected 抑制点击:swipeDetected 由 5dp 位移触发,
// 而 dragActivated 由 touch slop(更大)触发。5dp~touchSlop 区间
// 若被 swipeDetected 吞掉点击且 drag 未激活,会造成快速打字漏键。
// 5dp 位移只用于取消长按(longPressJob)。
currentOnClick()
}
}
Expand Down
Loading