diff options
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | eas.json | 7 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | src/Navigation.tsx | 5 | ||||
-rw-r--r-- | src/view/shell/Drawer.tsx | 9 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBarWeb.tsx | 28 |
6 files changed, 40 insertions, 14 deletions
diff --git a/LICENSE b/LICENSE index 801636644..d6da98bd5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2023 Bluesky PBLLC +Copyright 2023 Bluesky PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/eas.json b/eas.json index 240bc017d..69e5c94d6 100644 --- a/eas.json +++ b/eas.json @@ -33,6 +33,13 @@ "resourceClass": "m-large" }, "channel": "production" + }, + "dev-android-apk": { + "developmentClient": true, + "android": { + "buildType": "apk", + "gradleCommand": ":app:assembleRelease" + } } }, "submit": { diff --git a/package.json b/package.json index 69ba6f679..baf4f2843 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "e2e:mock-server": "ts-node __e2e__/mock-server.ts", "e2e:metro": "RN_SRC_EXT=e2e.ts,e2e.tsx expo run:ios", "e2e:build": "detox build -c ios.sim.debug", - "e2e:run": "detox test --configuration ios.sim.debug --take-screenshots all" + "e2e:run": "detox test --configuration ios.sim.debug --take-screenshots all", + "build:apk": "eas build -p android --profile dev-android-apk" }, "dependencies": { "@atproto/api": "^0.6.12", diff --git a/src/Navigation.tsx b/src/Navigation.tsx index dac70dfc7..c16ff3a8c 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -348,7 +348,6 @@ const MyProfileTabNavigator = observer(function MyProfileTabNavigatorImpl() { component={ProfileScreen} initialParams={{ name: store.me.did, - hideBackButton: true, }} /> {commonScreens(MyProfileTab as typeof HomeTab)} @@ -362,7 +361,9 @@ const MyProfileTabNavigator = observer(function MyProfileTabNavigatorImpl() { */ const FlatNavigator = observer(function FlatNavigatorImpl() { const pal = usePalette('default') - const unreadCountLabel = useStores().me.notifications.unreadCountLabel + const store = useStores() + const unreadCountLabel = store.me.notifications.unreadCountLabel + const title = (page: string) => bskyTitle(page, unreadCountLabel) return ( <Flat.Navigator diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 3379d0501..67092938e 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -64,8 +64,13 @@ export const DrawerContent = observer(function DrawerContentImpl() { const state = navigation.getState() store.shell.closeDrawer() if (isWeb) { - // @ts-ignore must be Home, Search, Notifications, or MyProfile - navigation.navigate(tab) + // hack because we have flat navigator for web and MyProfile does not exist on the web navigator -ansh + if (tab === 'MyProfile') { + navigation.navigate('Profile', {name: store.me.handle}) + } else { + // @ts-ignore must be Home, Search, Notifications, or MyProfile + navigation.navigate(tab) + } } else { const tabState = getTabState(state, tab) if (tabState === TabState.InsideAtRoot) { diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx index ee575c217..af70d3364 100644 --- a/src/view/shell/bottom-bar/BottomBarWeb.tsx +++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx @@ -18,10 +18,12 @@ import { SatelliteDishIcon, SatelliteDishIconSolid, UserIcon, + UserIconSolid, } from 'lib/icons' import {Link} from 'view/com/util/Link' import {useMinimalShellMode} from 'lib/hooks/useMinimalShellMode' import {makeProfileLink} from 'lib/routes/links' +import {CommonNavigatorParams} from 'lib/routes/types' export const BottomBarWeb = observer(function BottomBarWebImpl() { const store = useStores() @@ -89,13 +91,16 @@ export const BottomBarWeb = observer(function BottomBarWebImpl() { }} </NavItem> <NavItem routeName="Profile" href={makeProfileLink(store.me)}> - {() => ( - <UserIcon - size={28} - strokeWidth={1.5} - style={[styles.ctrlIcon, pal.text, styles.profileIcon]} - /> - )} + {({isActive}) => { + const Icon = isActive ? UserIconSolid : UserIcon + return ( + <Icon + size={28} + strokeWidth={1.5} + style={[styles.ctrlIcon, pal.text, styles.profileIcon]} + /> + ) + }} </NavItem> </Animated.View> ) @@ -107,7 +112,14 @@ const NavItem: React.FC<{ routeName: string }> = ({children, href, routeName}) => { const currentRoute = useNavigationState(getCurrentRoute) - const isActive = isTab(currentRoute.name, routeName) + const store = useStores() + const isActive = + currentRoute.name === 'Profile' + ? isTab(currentRoute.name, routeName) && + (currentRoute.params as CommonNavigatorParams['Profile']).name === + store.me.handle + : isTab(currentRoute.name, routeName) + return ( <Link href={href} style={styles.ctrl}> {children({isActive})} |