diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx
index e7dcf09b83..535306afbc 100644
--- a/src/view/com/feeds/FeedPage.tsx
+++ b/src/view/com/feeds/FeedPage.tsx
@@ -41,7 +41,7 @@ export function FeedPage({
renderEmptyState: () => JSX.Element
renderEndOfFeed?: () => JSX.Element
}) {
- const {isSandbox} = useSession()
+ const {isSandbox, hasSession} = useSession()
const pal = usePalette('default')
const {_} = useLingui()
const {isDesktop} = useWebMediaQueries()
@@ -123,24 +123,35 @@ export function FeedPage({
}
onPress={emitSoftReset}
/>
-
- }
- />
+ {hasSession && (
+
+ }
+ />
+ )}
)
}
return <>>
- }, [isDesktop, pal.view, pal.text, pal.textLight, hasNew, _, isSandbox])
+ }, [
+ isDesktop,
+ pal.view,
+ pal.text,
+ pal.textLight,
+ hasNew,
+ _,
+ isSandbox,
+ hasSession,
+ ])
return (
@@ -166,14 +177,17 @@ export function FeedPage({
showIndicator={hasNew}
/>
)}
- }
- accessibilityRole="button"
- accessibilityLabel={_(msg`New post`)}
- accessibilityHint=""
- />
+
+ {hasSession && (
+ }
+ accessibilityRole="button"
+ accessibilityLabel={_(msg`New post`)}
+ accessibilityHint=""
+ />
+ )}
)
}
diff --git a/src/view/screens/Feeds.tsx b/src/view/screens/Feeds.tsx
index 284339118c..f8fc0db178 100644
--- a/src/view/screens/Feeds.tsx
+++ b/src/view/screens/Feeds.tsx
@@ -504,14 +504,16 @@ export const FeedsScreen = withAuthRequired(
desktopFixedHeight
/>
- }
- accessibilityRole="button"
- accessibilityLabel={_(msg`New post`)}
- accessibilityHint=""
- />
+ {hasSession && (
+ }
+ accessibilityRole="button"
+ accessibilityLabel={_(msg`New post`)}
+ accessibilityHint=""
+ />
+ )}
)
},
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index 1d03f28019..55fe02cdd5 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -131,7 +131,7 @@ function ProfileScreenLoaded({
hideBackButton: boolean
}) {
const profile = useProfileShadow(profileUnshadowed)
- const {currentAccount} = useSession()
+ const {hasSession, currentAccount} = useSession()
const setMinimalShellMode = useSetMinimalShellMode()
const {openComposer} = useComposerControls()
const {screen, track} = useAnalytics()
@@ -360,14 +360,16 @@ function ProfileScreenLoaded({
)
: null}
- }
- accessibilityRole="button"
- accessibilityLabel={_(msg`New post`)}
- accessibilityHint=""
- />
+ {hasSession && (
+ }
+ accessibilityRole="button"
+ accessibilityLabel={_(msg`New post`)}
+ accessibilityHint=""
+ />
+ )}
)
}
diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx
index 28a61beaf0..642793edac 100644
--- a/src/view/screens/ProfileFeed.tsx
+++ b/src/view/screens/ProfileFeed.tsx
@@ -423,16 +423,22 @@ export function ProfileFeedScreenInner({
/>
)}
- openComposer({})}
- icon={
-
- }
- accessibilityRole="button"
- accessibilityLabel={_(msg`New post`)}
- accessibilityHint=""
- />
+ {hasSession && (
+ openComposer({})}
+ icon={
+
+ }
+ accessibilityRole="button"
+ accessibilityLabel={_(msg`New post`)}
+ accessibilityHint=""
+ />
+ )}
)
}