Disable access to feeds on PWI
This commit is contained in:
+6
-2
@@ -182,7 +182,7 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) {
|
|||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="ProfileFeed"
|
name="ProfileFeed"
|
||||||
getComponent={() => ProfileFeedScreen}
|
getComponent={() => ProfileFeedScreen}
|
||||||
options={{title: title('Feed')}}
|
options={{title: title('Feed'), requireAuth: true}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="ProfileFeedLikedBy"
|
name="ProfileFeedLikedBy"
|
||||||
@@ -327,7 +327,11 @@ function FeedsTabNavigator() {
|
|||||||
animationDuration: 250,
|
animationDuration: 250,
|
||||||
contentStyle,
|
contentStyle,
|
||||||
}}>
|
}}>
|
||||||
<FeedsTab.Screen name="Feeds" getComponent={() => FeedsScreen} />
|
<FeedsTab.Screen
|
||||||
|
name="Feeds"
|
||||||
|
getComponent={() => FeedsScreen}
|
||||||
|
options={{requireAuth: true}}
|
||||||
|
/>
|
||||||
{commonScreens(FeedsTab as typeof HomeTab)}
|
{commonScreens(FeedsTab as typeof HomeTab)}
|
||||||
</FeedsTab.Navigator>
|
</FeedsTab.Navigator>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ function ProfileScreenLoaded({
|
|||||||
const isMe = profile.did === currentAccount?.did
|
const isMe = profile.did === currentAccount?.did
|
||||||
const showRepliesTab = hasSession
|
const showRepliesTab = hasSession
|
||||||
const showLikesTab = isMe
|
const showLikesTab = isMe
|
||||||
const showFeedsTab = isMe || extraInfoQuery.data?.hasFeedgens
|
const showFeedsTab = hasSession && (isMe || extraInfoQuery.data?.hasFeedgens)
|
||||||
const showListsTab = hasSession && (isMe || extraInfoQuery.data?.hasLists)
|
const showListsTab = hasSession && (isMe || extraInfoQuery.data?.hasLists)
|
||||||
const sectionTitles = useMemo<string[]>(() => {
|
const sectionTitles = useMemo<string[]>(() => {
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ export function BottomBar({navigation}: BottomTabBarProps) {
|
|||||||
accessibilityLabel={_(msg`Search`)}
|
accessibilityLabel={_(msg`Search`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{hasSession && (
|
||||||
|
<>
|
||||||
<Btn
|
<Btn
|
||||||
testID="bottomBarFeedsBtn"
|
testID="bottomBarFeedsBtn"
|
||||||
icon={
|
icon={
|
||||||
@@ -160,9 +163,6 @@ export function BottomBar({navigation}: BottomTabBarProps) {
|
|||||||
accessibilityLabel={_(msg`Feeds`)}
|
accessibilityLabel={_(msg`Feeds`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{hasSession && (
|
|
||||||
<>
|
|
||||||
<Btn
|
<Btn
|
||||||
testID="bottomBarNotificationsBtn"
|
testID="bottomBarNotificationsBtn"
|
||||||
icon={
|
icon={
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ export function BottomBarWeb() {
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</NavItem>
|
</NavItem>
|
||||||
|
|
||||||
|
{hasSession && (
|
||||||
|
<>
|
||||||
<NavItem routeName="Feeds" href="/feeds">
|
<NavItem routeName="Feeds" href="/feeds">
|
||||||
{({isActive}) => {
|
{({isActive}) => {
|
||||||
return (
|
return (
|
||||||
@@ -75,9 +78,6 @@ export function BottomBarWeb() {
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</NavItem>
|
</NavItem>
|
||||||
|
|
||||||
{hasSession && (
|
|
||||||
<>
|
|
||||||
<NavItem routeName="Notifications" href="/notifications">
|
<NavItem routeName="Notifications" href="/notifications">
|
||||||
{({isActive}) => {
|
{({isActive}) => {
|
||||||
const Icon = isActive ? BellIconSolid : BellIcon
|
const Icon = isActive ? BellIconSolid : BellIcon
|
||||||
|
|||||||
@@ -314,6 +314,8 @@ export function DesktopLeftNav() {
|
|||||||
}
|
}
|
||||||
label={_(msg`Search`)}
|
label={_(msg`Search`)}
|
||||||
/>
|
/>
|
||||||
|
{hasSession && (
|
||||||
|
<>
|
||||||
<NavItem
|
<NavItem
|
||||||
href="/feeds"
|
href="/feeds"
|
||||||
icon={
|
icon={
|
||||||
@@ -332,9 +334,6 @@ export function DesktopLeftNav() {
|
|||||||
}
|
}
|
||||||
label={_(msg`Feeds`)}
|
label={_(msg`Feeds`)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{hasSession && (
|
|
||||||
<>
|
|
||||||
<NavItem
|
<NavItem
|
||||||
href="/notifications"
|
href="/notifications"
|
||||||
count={numUnread}
|
count={numUnread}
|
||||||
|
|||||||
Reference in New Issue
Block a user