Skip to content

A live bird collage card for your Home Assistant dashboard.

fix: small, fast scrolls might be detected as swipes

frederik98f0d0432988
diff --git a/homepage/views.php b/homepage/views.php
index c1d92113..a3414be0 100644
--- a/homepage/views.php
+++ b/homepage/views.php
@@ -434,7 +434,7 @@ function installKeyAndSwipeEventHandler() {
let diffTime = 0;
function checkDirection() {
- if (Math.abs(diffX) > Math.abs(diffY) && diffTime < 500) {
+ if (Math.abs(diffX) > Math.abs(diffY) && diffTime < 350) {
if (diffX > 20) getTheDate(+1);
if (diffX < -20) getTheDate(-1);
}