about summary refs log tree commit diff
path: root/src/view/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens')
-rw-r--r--src/view/screens/CustomFeed.tsx5
-rw-r--r--src/view/screens/SavedFeeds.tsx16
2 files changed, 13 insertions, 8 deletions
diff --git a/src/view/screens/CustomFeed.tsx b/src/view/screens/CustomFeed.tsx
index 7ff22f7f3..353995540 100644
--- a/src/view/screens/CustomFeed.tsx
+++ b/src/view/screens/CustomFeed.tsx
@@ -24,6 +24,9 @@ import {isDesktopWeb} from 'platform/detection'
 import {useSetTitle} from 'lib/hooks/useSetTitle'
 import {shareUrl} from 'lib/sharing'
 import {toShareUrl} from 'lib/strings/url-helpers'
+import { Haptics } from 'lib/haptics'
+
+const HITSLOP = {top: 5, left: 5, bottom: 5, right: 5}
 
 type Props = NativeStackScreenProps<CommonNavigatorParams, 'CustomFeed'>
 export const CustomFeedScreen = withAuthRequired(
@@ -49,6 +52,7 @@ export const CustomFeedScreen = withAuthRequired(
 
     const onToggleSaved = React.useCallback(async () => {
       try {
+        Haptics.default()
         if (currentFeed?.isSaved) {
           await currentFeed?.unsave()
         } else {
@@ -63,6 +67,7 @@ export const CustomFeedScreen = withAuthRequired(
     }, [store, currentFeed])
 
     const onToggleLiked = React.useCallback(async () => {
+      Haptics.default()
       try {
         if (currentFeed?.isLiked) {
           await currentFeed?.unlike()
diff --git a/src/view/screens/SavedFeeds.tsx b/src/view/screens/SavedFeeds.tsx
index 613e42fbf..0213b36a9 100644
--- a/src/view/screens/SavedFeeds.tsx
+++ b/src/view/screens/SavedFeeds.tsx
@@ -28,6 +28,7 @@ import {CustomFeed} from 'view/com/feeds/CustomFeed'
 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
 import {CustomFeedModel} from 'state/models/feeds/custom-feed'
 import * as Toast from 'view/com/util/Toast'
+import {Haptics} from 'lib/haptics'
 
 type Props = NativeStackScreenProps<CommonNavigatorParams, 'SavedFeeds'>
 
@@ -128,14 +129,13 @@ const ListItem = observer(
     const savedFeeds = useMemo(() => store.me.savedFeeds, [store])
     const isPinned = savedFeeds.isPinned(item)
 
-    const onTogglePinned = useCallback(
-      () =>
-        savedFeeds.togglePinnedFeed(item).catch(e => {
-          Toast.show('There was an issue contacting the server')
-          store.log.error('Failed to toggle pinned feed', {e})
-        }),
-      [savedFeeds, item, store],
-    )
+    const onTogglePinned = useCallback(() => {
+      Haptics.default()
+      savedFeeds.togglePinnedFeed(item).catch(e => {
+        Toast.show('There was an issue contacting the server')
+        store.log.error('Failed to toggle pinned feed', {e})
+      })
+    }, [savedFeeds, item, store])
     const onPressUp = useCallback(
       () =>
         savedFeeds.movePinnedFeed(item, 'up').catch(e => {