summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkPullToRefresh.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-08-18 10:49:27 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-08-18 10:49:27 +0900
commitfcde6789ff4d896e2170b36faa9e9fba7b4a0e57 (patch)
treeab2cebb72af4f45639272cde36d2d21a94c37f8c /packages/frontend/src/components/MkPullToRefresh.vue
parentBump version to 2025.8.0-alpha.13 (diff)
downloadmisskey-fcde6789ff4d896e2170b36faa9e9fba7b4a0e57.tar.gz
misskey-fcde6789ff4d896e2170b36faa9e9fba7b4a0e57.tar.bz2
misskey-fcde6789ff4d896e2170b36faa9e9fba7b4a0e57.zip
feat(frontend): introduce haptic feedback as experimental feature
#16410
Diffstat (limited to 'packages/frontend/src/components/MkPullToRefresh.vue')
-rw-r--r--packages/frontend/src/components/MkPullToRefresh.vue3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkPullToRefresh.vue b/packages/frontend/src/components/MkPullToRefresh.vue
index c792ff3488..89aca5d29b 100644
--- a/packages/frontend/src/components/MkPullToRefresh.vue
+++ b/packages/frontend/src/components/MkPullToRefresh.vue
@@ -27,6 +27,7 @@ import { onMounted, onUnmounted, ref, useTemplateRef } from 'vue';
import { getScrollContainer } from '@@/js/scroll.js';
import { i18n } from '@/i18n.js';
import { isHorizontalSwipeSwiping } from '@/utility/touch.js';
+import { haptic } from '@/utility/haptic.js';
const SCROLL_STOP = 10;
const MAX_PULL_DISTANCE = Infinity;
@@ -203,6 +204,8 @@ function moving(event: MouseEvent | TouchEvent) {
pullDistance.value = Math.min(Math.max(moveHeight, 0), MAX_PULL_DISTANCE);
isPulledEnough.value = pullDistance.value >= FIRE_THRESHOLD;
+
+ if (isPulledEnough.value) haptic();
}
/**