Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix profile load issue + enhancement of profile isCurrent style (#764)

* fix profile isActive issue

* fix myProfile load issue when visiting other profiles first

* fix lint issues

* change currentRouteName to currentRouteInfo

authored by

MohammadReza Mahmoudi and committed by
GitHub
442d4536 5d0a3e6c

+12 -5
+4
src/view/screens/Profile.tsx
··· 47 47 ) 48 48 useSetTitle(combinedDisplayName(uiState.profile)) 49 49 50 + useEffect(() => { 51 + setHasSetup(false) 52 + }, [route.params.name]) 53 + 50 54 useFocusEffect( 51 55 React.useCallback(() => { 52 56 let aborted = false
+8 -5
src/view/shell/desktop/LeftNav.tsx
··· 91 91 const pal = usePalette('default') 92 92 const store = useStores() 93 93 const [pathName] = React.useMemo(() => router.matchPath(href), [href]) 94 - const currentRouteName = useNavigationState(state => { 94 + const currentRouteInfo = useNavigationState(state => { 95 95 if (!state) { 96 - return 'Home' 96 + return {name: 'Home'} 97 97 } 98 - return getCurrentRoute(state).name 98 + return getCurrentRoute(state) 99 99 }) 100 - 101 - const isCurrent = isTab(currentRouteName, pathName) 100 + let isCurrent = 101 + currentRouteInfo.name === 'Profile' 102 + ? isTab(currentRouteInfo.name, pathName) && 103 + currentRouteInfo.params.name === store.me.handle 104 + : isTab(currentRouteInfo.name, pathName) 102 105 const {onPress} = useLinkProps({to: href}) 103 106 const onPressWrapped = React.useCallback( 104 107 (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {