mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:43:25 +00:00
feat: haptic feedback
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useRef } from "react";
|
||||
import { Platform, View } from "react-native";
|
||||
import * as Haptics from "expo-haptics";
|
||||
import { Tabs } from "expo-router";
|
||||
|
||||
import Colors from "@movie-web/tailwind-config/colors";
|
||||
@@ -21,6 +22,9 @@ export default function TabLayout() {
|
||||
}}
|
||||
screenListeners={({ route }) => ({
|
||||
tabPress: () => {
|
||||
void Haptics.notificationAsync(
|
||||
Haptics.NotificationFeedbackType.Success,
|
||||
);
|
||||
switch (route.name) {
|
||||
case "search":
|
||||
focusSearchInputRef.current();
|
||||
|
@@ -10,6 +10,7 @@ import {
|
||||
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
||||
import { runOnJS, useSharedValue } from "react-native-reanimated";
|
||||
import { ResizeMode, Video } from "expo-av";
|
||||
import * as Haptics from "expo-haptics";
|
||||
import * as NavigationBar from "expo-navigation-bar";
|
||||
import { useRouter } from "expo-router";
|
||||
import * as StatusBar from "expo-status-bar";
|
||||
@@ -58,6 +59,7 @@ export const VideoPlayer = () => {
|
||||
|
||||
const updateResizeMode = (newMode: ResizeMode) => {
|
||||
setResizeMode(newMode);
|
||||
void Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
|
||||
};
|
||||
|
||||
const pinchGesture = Gesture.Pinch().onUpdate((e) => {
|
||||
|
Reference in New Issue
Block a user