Skip to content

Commit

Permalink
fix: set vibrate duration only if time > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz authored and WhiredPlanck committed Mar 15, 2024
1 parent a312a4e commit fc22c80
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ object InputFeedbackManager {
HapticFeedbackConstants.KEYBOARD_TAP
}

if (duration != 0L) { // use vibrator
if (duration > 0L) { // use vibrator
if (hasAmplitudeControl && amplitude != 0) {
vibrator.vibrate(VibrationEffect.createOneShot(duration, amplitude))
} else {
Expand Down

0 comments on commit fc22c80

Please sign in to comment.