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,24 +123,35 @@ export function FeedPage({
|
|||||||
}
|
}
|
||||||
onPress={emitSoftReset}
|
onPress={emitSoftReset}
|
||||||
/>
|
/>
|
||||||
<TextLink
|
{hasSession && (
|
||||||
type="title-lg"
|
<TextLink
|
||||||
href="/settings/home-feed"
|
type="title-lg"
|
||||||
style={{fontWeight: 'bold'}}
|
href="/settings/home-feed"
|
||||||
accessibilityLabel={_(msg`Feed Preferences`)}
|
style={{fontWeight: 'bold'}}
|
||||||
accessibilityHint=""
|
accessibilityLabel={_(msg`Feed Preferences`)}
|
||||||
text={
|
accessibilityHint=""
|
||||||
<FontAwesomeIcon
|
text={
|
||||||
icon="sliders"
|
<FontAwesomeIcon
|
||||||
style={pal.textLight as FontAwesomeIconStyle}
|
icon="sliders"
|
||||||
/>
|
style={pal.textLight as FontAwesomeIconStyle}
|
||||||
}
|
/>
|
||||||
/>
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</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,14 +177,17 @@ export function FeedPage({
|
|||||||
showIndicator={hasNew}
|
showIndicator={hasNew}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<FAB
|
|
||||||
testID="composeFAB"
|
{hasSession && (
|
||||||
onPress={onPressCompose}
|
<FAB
|
||||||
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
testID="composeFAB"
|
||||||
accessibilityRole="button"
|
onPress={onPressCompose}
|
||||||
accessibilityLabel={_(msg`New post`)}
|
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
||||||
accessibilityHint=""
|
accessibilityRole="button"
|
||||||
/>
|
accessibilityLabel={_(msg`New post`)}
|
||||||
|
accessibilityHint=""
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -504,14 +504,16 @@ export const FeedsScreen = withAuthRequired(
|
|||||||
desktopFixedHeight
|
desktopFixedHeight
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FAB
|
{hasSession && (
|
||||||
testID="composeFAB"
|
<FAB
|
||||||
onPress={onPressCompose}
|
testID="composeFAB"
|
||||||
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
onPress={onPressCompose}
|
||||||
accessibilityRole="button"
|
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityRole="button"
|
||||||
accessibilityHint=""
|
accessibilityLabel={_(msg`New post`)}
|
||||||
/>
|
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,14 +360,16 @@ function ProfileScreenLoaded({
|
|||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
</PagerWithHeader>
|
</PagerWithHeader>
|
||||||
<FAB
|
{hasSession && (
|
||||||
testID="composeFAB"
|
<FAB
|
||||||
onPress={onPressCompose}
|
testID="composeFAB"
|
||||||
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
onPress={onPressCompose}
|
||||||
accessibilityRole="button"
|
icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
|
||||||
accessibilityLabel={_(msg`New post`)}
|
accessibilityRole="button"
|
||||||
accessibilityHint=""
|
accessibilityLabel={_(msg`New post`)}
|
||||||
/>
|
accessibilityHint=""
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</ScreenHider>
|
</ScreenHider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,16 +423,22 @@ export function ProfileFeedScreenInner({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</PagerWithHeader>
|
</PagerWithHeader>
|
||||||
<FAB
|
{hasSession && (
|
||||||
testID="composeFAB"
|
<FAB
|
||||||
onPress={() => openComposer({})}
|
testID="composeFAB"
|
||||||
icon={
|
onPress={() => openComposer({})}
|
||||||
<ComposeIcon2 strokeWidth={1.5} size={29} style={{color: 'white'}} />
|
icon={
|
||||||
}
|
<ComposeIcon2
|
||||||
accessibilityRole="button"
|
strokeWidth={1.5}
|
||||||
accessibilityLabel={_(msg`New post`)}
|
size={29}
|
||||||
accessibilityHint=""
|
style={{color: 'white'}}
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
|
accessibilityRole="button"
|
||||||
|
accessibilityLabel={_(msg`New post`)}
|
||||||
|
accessibilityHint=""
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user