Compare commits

...

4 Commits

Author SHA1 Message Date
Eric Bailey abbeef7b8d Merge remote-tracking branch 'origin/main' into fast-follow
* origin/main: (50 commits)
  Add `list hidden` screen (#4958)
  Expose more methods, support disabled items (#4954)
  Expose more props from button (#4953)
  Fix orphaned feed slices, handle blocks (#4944)
  Tweak `expo-modules-core` hack patch (#4955)
  [Experiment] Always show bottom bar (#4946)
  Revert "[Video] Download videos" (#4945)
  Move global "Sign out" out of the current account row (#4941)
  Hack patch for testing OTA update crash behavior (#4942)
  [Video] Download videos (#4886)
  swap control files (#4936)
  [Embed] Starter pack embed embed (#4935)
  [Video] set audio category to ambient every time a new player is made (#4934)
  Add `/live/` to supported YouTube embed URLs (#4932)
  [Video] Try/catch video play/pause (#4930)
  Don't kick to login screen on network error (#4911)
  Remove .withProxy() calls (#4929)
  [Video] Audio duck off main thread (#4926)
  subclass agent to add setPersistSessionHandler (#4928)
  [Video] Fix crash when switching tabs (#4925)
  ...
2024-08-21 09:37:43 -05:00
Eric Bailey 67ca832bae Explicit show 2024-08-08 09:49:04 -05:00
Eric Bailey 04c72ed787 Auto-show sugg follows behind gate 2024-08-08 09:48:25 -05:00
Eric Bailey d049554605 Filter out followed users 2024-08-08 09:38:28 -05:00
3 changed files with 12 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
export type Gate =
// Keep this alphabetic please.
| 'auto_show_prof_sugg_follows'
| 'debug_show_feedcontext'
| 'fixed_bottom_bar'
| 'new_user_guided_tour'
@@ -10,6 +10,7 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {useGate} from '#/lib/statsig/statsig'
import {logger} from '#/logger'
import {isIOS} from '#/platform/detection'
import {Shadow} from '#/state/cache/types'
@@ -79,6 +80,7 @@ let ProfileHeaderStandard = ({
profile.viewer?.blocking ||
profile.viewer?.blockedBy ||
profile.viewer?.blockingByList
const gate = useGate()
const onPressEditProfile = React.useCallback(() => {
track('ProfileHeader:EditProfileButtonClicked')
@@ -101,6 +103,9 @@ let ProfileHeaderStandard = ({
)}`,
),
)
if (gate('auto_show_prof_sugg_follows')) {
setShowSuggestedFollows(true)
}
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to follow', {message: String(e)})
+6
View File
@@ -114,6 +114,12 @@ export function useSuggestedFollowsByActorQuery({did}: {did: string}) {
})
return res.data
},
select: data => {
data.suggestions = data.suggestions.filter(p => {
return !p.viewer?.following
})
return data
},
})
}