Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Lookup did for my profile at screen to avoid bad actor error (#1800)

authored by

Paul Frazee and committed by
GitHub
846c1307 8747c215

+5 -5
+1 -2
src/Navigation.tsx
··· 349 349 350 350 const MyProfileTabNavigator = observer(function MyProfileTabNavigatorImpl() { 351 351 const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 352 - const store = useStores() 353 352 return ( 354 353 <MyProfileTab.Navigator 355 354 screenOptions={{ ··· 364 363 // @ts-ignore // TODO: fix this broken type in ProfileScreen 365 364 getComponent={() => ProfileScreen} 366 365 initialParams={{ 367 - name: store.me.did, 366 + name: 'me', 368 367 }} 369 368 /> 370 369 {commonScreens(MyProfileTab as typeof HomeTab)}
+4 -3
src/view/screens/Profile.tsx
··· 36 36 const store = useStores() 37 37 const {screen, track} = useAnalytics() 38 38 const viewSelectorRef = React.useRef<ViewSelectorHandle>(null) 39 + const name = route.params.name === 'me' ? store.me.did : route.params.name 39 40 40 41 useEffect(() => { 41 42 screen('Profile') ··· 43 44 44 45 const [hasSetup, setHasSetup] = useState<boolean>(false) 45 46 const uiState = React.useMemo( 46 - () => new ProfileUiModel(store, {user: route.params.name}), 47 - [route.params.name, store], 47 + () => new ProfileUiModel(store, {user: name}), 48 + [name, store], 48 49 ) 49 50 useSetTitle(combinedDisplayName(uiState.profile)) 50 51 ··· 54 55 55 56 useEffect(() => { 56 57 setHasSetup(false) 57 - }, [route.params.name]) 58 + }, [name]) 58 59 59 60 // We don't need this to be reactive, so we can just register the listeners once 60 61 useEffect(() => {