about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/api/feed/home.ts6
-rw-r--r--src/lib/custom-animations/GestureActionView.tsx15
-rw-r--r--src/lib/notifications/notifications.e2e.ts6
-rw-r--r--src/lib/statsig/gates.ts1
-rw-r--r--src/lib/statsig/statsig.tsx3
5 files changed, 22 insertions, 9 deletions
diff --git a/src/lib/api/feed/home.ts b/src/lib/api/feed/home.ts
index e6bc45bea..7a0d72d91 100644
--- a/src/lib/api/feed/home.ts
+++ b/src/lib/api/feed/home.ts
@@ -1,9 +1,9 @@
-import {AppBskyFeedDefs, BskyAgent} from '@atproto/api'
+import {type AppBskyFeedDefs, type BskyAgent} from '@atproto/api'
 
 import {PROD_DEFAULT_FEED} from '#/lib/constants'
 import {CustomFeedAPI} from './custom'
 import {FollowingFeedAPI} from './following'
-import {FeedAPI, FeedAPIResponse} from './types'
+import {type FeedAPI, type FeedAPIResponse} from './types'
 
 // HACK
 // the feed API does not include any facilities for passing down
@@ -93,7 +93,7 @@ export class HomeFeedAPI implements FeedAPI {
       }
     }
 
-    if (this.usingDiscover) {
+    if (this.usingDiscover && !__DEV__) {
       const res = await this.discover.fetch({cursor, limit})
       returnCursor = res.cursor
       posts = posts.concat(res.feed)
diff --git a/src/lib/custom-animations/GestureActionView.tsx b/src/lib/custom-animations/GestureActionView.tsx
index ba6952a81..e7fba570b 100644
--- a/src/lib/custom-animations/GestureActionView.tsx
+++ b/src/lib/custom-animations/GestureActionView.tsx
@@ -1,5 +1,5 @@
 import React from 'react'
-import {ColorValue, Dimensions, StyleSheet, View} from 'react-native'
+import {type ColorValue, Dimensions, StyleSheet, View} from 'react-native'
 import {Gesture, GestureDetector} from 'react-native-gesture-handler'
 import Animated, {
   clamp,
@@ -114,11 +114,16 @@ export function GestureActionView({
     },
   )
 
+  // NOTE(haileyok):
+  // Absurdly high value so it doesn't interfere with the pan gestures above (i.e., scroll)
+  // reanimated doesn't offer great support for disabling y/x axes :/
+  const effectivelyDisabledOffset = 200
   const panGesture = Gesture.Pan()
-    .activeOffsetX([-10, 10])
-    // Absurdly high value so it doesn't interfere with the pan gestures above (i.e., scroll)
-    // reanimated doesn't offer great support for disabling y/x axes :/
-    .activeOffsetY([-200, 200])
+    .activeOffsetX([
+      actions.leftFirst ? -10 : -effectivelyDisabledOffset,
+      actions.rightFirst ? 10 : effectivelyDisabledOffset,
+    ])
+    .activeOffsetY([-effectivelyDisabledOffset, effectivelyDisabledOffset])
     .onStart(() => {
       'worklet'
       isActive.set(true)
diff --git a/src/lib/notifications/notifications.e2e.ts b/src/lib/notifications/notifications.e2e.ts
index 0586ac1bf..1a9d861b7 100644
--- a/src/lib/notifications/notifications.e2e.ts
+++ b/src/lib/notifications/notifications.e2e.ts
@@ -1,3 +1,5 @@
+import {useCallback} from 'react'
+
 export function useNotificationsRegistration() {}
 
 export function useRequestNotificationsPermission() {
@@ -6,6 +8,10 @@ export function useRequestNotificationsPermission() {
   ) => {}
 }
 
+export function useGetAndRegisterPushToken() {
+  return useCallback(async ({}: {} = {}) => {}, [])
+}
+
 export async function decrementBadgeCount(_by: number) {}
 
 export async function resetBadgeCount() {}
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index efd7d605a..3b1106480 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -1,6 +1,5 @@
 export type Gate =
   // Keep this alphabetic please.
-  | 'age_assurance'
   | 'alt_share_icon'
   | 'debug_show_feedcontext'
   | 'debug_subscriptions'
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index f509f2980..f2d3ffca9 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -8,6 +8,7 @@ import {logger} from '#/logger'
 import {type MetricEvents} from '#/logger/metrics'
 import {isWeb} from '#/platform/detection'
 import * as persisted from '#/state/persisted'
+import packageDotJson from '../../../package.json'
 import {useSession} from '../../state/session'
 import {timeout} from '../async/timeout'
 import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
@@ -25,6 +26,7 @@ type StatsigUser = {
     // This is the place where we can add our own stuff.
     // Fields here have to be non-optional to be visible in the UI.
     platform: 'ios' | 'android' | 'web'
+    appVersion: string
     bundleIdentifier: string
     bundleDate: number
     refSrc: string
@@ -210,6 +212,7 @@ function toStatsigUser(did: string | undefined): StatsigUser {
       refSrc,
       refUrl,
       platform: Platform.OS as 'ios' | 'android' | 'web',
+      appVersion: packageDotJson.version,
       bundleIdentifier: BUNDLE_IDENTIFIER,
       bundleDate: BUNDLE_DATE,
       appLanguage: languagePrefs.appLanguage,