Hide FABs
This commit is contained in:
@@ -41,7 +41,7 @@ export function FeedPage({
|
|||||||
renderEmptyState: () => JSX.Element
|
renderEmptyState: () => JSX.Element
|
||||||
renderEndOfFeed?: () => JSX.Element
|
renderEndOfFeed?: () => JSX.Element
|
||||||
}) {
|
}) {
|
||||||
const {isSandbox} = useSession()
|
const {isSandbox, hasSession} = useSession()
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {isDesktop} = useWebMediaQueries()
|
const {isDesktop} = useWebMediaQueries()
|
||||||
@@ -123,6 +123,7 @@ export function FeedPage({
|
|||||||
}
|
}
|
||||||
onPress={emitSoftReset}
|
onPress={emitSoftReset}
|
||||||
/>
|
/>
|
||||||
|
{hasSession && (
|
||||||
<TextLink
|
<TextLink
|
||||||
type="title-lg"
|
type="title-lg"
|
||||||
href="/settings/home-feed"
|
href="/settings/home-feed"
|
||||||
@@ -136,11 +137,21 @@ export function FeedPage({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return <></>
|
return <></>
|
||||||
}, [isDesktop, pal.view, pal.text, pal.textLight, hasNew, _, isSandbox])
|
}, [
|
||||||
|
isDesktop,
|
||||||
|
pal.view,
|
||||||
|
pal.text,
|
||||||
|
pal.textLight,
|
||||||
|
hasNew,
|
||||||
|
_,
|
||||||
|
isSandbox,
|
||||||
|
hasSession,
|
||||||
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View testID={testID} style={s.h100pct}>
|
<View testID={testID} style={s.h100pct}>
|
||||||
@@ -166,6 +177,8 @@ export function FeedPage({
|
|||||||
showIndicator={hasNew}
|
showIndicator={hasNew}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{hasSession && (
|
||||||
<FAB
|
<FAB
|
||||||
testID="composeFAB"
|
testID="composeFAB"
|
||||||
onPress={onPressCompose}
|
onPress={onPressCompose}
|
||||||
@@ -174,6 +187,7 @@ export function FeedPage({
|
|||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityLabel={_(msg`New post`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -504,6 +504,7 @@ export const FeedsScreen = withAuthRequired(
|
|||||||
desktopFixedHeight
|
desktopFixedHeight
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{hasSession && (
|
||||||
<FAB
|
<FAB
|
||||||
testID="composeFAB"
|
testID="composeFAB"
|
||||||
onPress={onPressCompose}
|
onPress={onPressCompose}
|
||||||
@@ -512,6 +513,7 @@ export const FeedsScreen = withAuthRequired(
|
|||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityLabel={_(msg`New post`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ function ProfileScreenLoaded({
|
|||||||
hideBackButton: boolean
|
hideBackButton: boolean
|
||||||
}) {
|
}) {
|
||||||
const profile = useProfileShadow(profileUnshadowed)
|
const profile = useProfileShadow(profileUnshadowed)
|
||||||
const {currentAccount} = useSession()
|
const {hasSession, currentAccount} = useSession()
|
||||||
const setMinimalShellMode = useSetMinimalShellMode()
|
const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
const {openComposer} = useComposerControls()
|
const {openComposer} = useComposerControls()
|
||||||
const {screen, track} = useAnalytics()
|
const {screen, track} = useAnalytics()
|
||||||
@@ -360,6 +360,7 @@ function ProfileScreenLoaded({
|
|||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
</PagerWithHeader>
|
</PagerWithHeader>
|
||||||
|
{hasSession && (
|
||||||
<FAB
|
<FAB
|
||||||
testID="composeFAB"
|
testID="composeFAB"
|
||||||
onPress={onPressCompose}
|
onPress={onPressCompose}
|
||||||
@@ -368,6 +369,7 @@ function ProfileScreenLoaded({
|
|||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityLabel={_(msg`New post`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</ScreenHider>
|
</ScreenHider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,16 +423,22 @@ export function ProfileFeedScreenInner({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</PagerWithHeader>
|
</PagerWithHeader>
|
||||||
|
{hasSession && (
|
||||||
<FAB
|
<FAB
|
||||||
testID="composeFAB"
|
testID="composeFAB"
|
||||||
onPress={() => openComposer({})}
|
onPress={() => openComposer({})}
|
||||||
icon={
|
icon={
|
||||||
<ComposeIcon2 strokeWidth={1.5} size={29} style={{color: 'white'}} />
|
<ComposeIcon2
|
||||||
|
strokeWidth={1.5}
|
||||||
|
size={29}
|
||||||
|
style={{color: 'white'}}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityLabel={_(msg`New post`)}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user