revert hiding fab
This commit is contained in:
@@ -6,7 +6,6 @@ import {logger} from '#/logger'
|
|||||||
import {useCreateGroupChat} from '#/state/queries/messages/create-group-chat'
|
import {useCreateGroupChat} from '#/state/queries/messages/create-group-chat'
|
||||||
import {useGetConvoForMembers} from '#/state/queries/messages/get-convo-for-members'
|
import {useGetConvoForMembers} from '#/state/queries/messages/get-convo-for-members'
|
||||||
import {FAB} from '#/view/com/util/fab/FAB'
|
import {FAB} from '#/view/com/util/fab/FAB'
|
||||||
import {useIsWithinSplitView} from '#/screens/Messages/components/splitView/context'
|
|
||||||
import {useTheme} from '#/alf'
|
import {useTheme} from '#/alf'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {SearchablePeopleList} from '#/components/dialogs/SearchablePeopleList'
|
import {SearchablePeopleList} from '#/components/dialogs/SearchablePeopleList'
|
||||||
@@ -26,7 +25,6 @@ export function NewChat({
|
|||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
const ax = useAnalytics()
|
const ax = useAnalytics()
|
||||||
const requireEmailVerification = useRequireEmailVerification()
|
const requireEmailVerification = useRequireEmailVerification()
|
||||||
const {isWithinSplitView} = useIsWithinSplitView()
|
|
||||||
|
|
||||||
const isGroupChatEnabled = ax.features.enabled(ax.features.GroupChatsEnable)
|
const isGroupChatEnabled = ax.features.enabled(ax.features.GroupChatsEnable)
|
||||||
|
|
||||||
@@ -101,17 +99,14 @@ export function NewChat({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* in split view, header button is always available, so no need for FAB */}
|
<FAB
|
||||||
{!isWithinSplitView && (
|
testID="newChatFAB"
|
||||||
<FAB
|
onPress={wrappedOnPress}
|
||||||
testID="newChatFAB"
|
icon={<NewChatIcon size="lg" fill={t.palette.white} />}
|
||||||
onPress={wrappedOnPress}
|
accessibilityRole="button"
|
||||||
icon={<NewChatIcon size="lg" fill={t.palette.white} />}
|
accessibilityLabel={l`New chat`}
|
||||||
accessibilityRole="button"
|
accessibilityHint=""
|
||||||
accessibilityLabel={l`New chat`}
|
/>
|
||||||
accessibilityHint=""
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={control}
|
control={control}
|
||||||
testID="newChatDialog"
|
testID="newChatDialog"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {useListConvosQuery} from '#/state/queries/messages/list-conversations'
|
|||||||
import {EmptyState} from '#/view/com/util/EmptyState'
|
import {EmptyState} from '#/view/com/util/EmptyState'
|
||||||
import {List, type ListRef} from '#/view/com/util/List'
|
import {List, type ListRef} from '#/view/com/util/List'
|
||||||
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
||||||
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
||||||
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
@@ -326,6 +326,16 @@ export function ChatList({selectedChat}: {selectedChat?: string}) {
|
|||||||
windowSize={11}
|
windowSize={11}
|
||||||
desktopFixedHeight
|
desktopFixedHeight
|
||||||
sideBorders={false}
|
sideBorders={false}
|
||||||
|
disableFullWindowScroll={isWithinSplitView}
|
||||||
|
style={
|
||||||
|
isWithinSplitView && [
|
||||||
|
a.w_full,
|
||||||
|
web({
|
||||||
|
scrollbarWidth: 'thin',
|
||||||
|
scrollbarColor: `${t.palette.contrast_100} transparent`,
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ import {Trans, useLingui} from '@lingui/react/macro'
|
|||||||
import {
|
import {
|
||||||
type RouteProp,
|
type RouteProp,
|
||||||
useFocusEffect,
|
useFocusEffect,
|
||||||
useIsFocused,
|
|
||||||
useNavigation,
|
useNavigation,
|
||||||
useRoute,
|
useRoute,
|
||||||
} from '@react-navigation/native'
|
} from '@react-navigation/native'
|
||||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
|
||||||
|
|
||||||
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||||
import {useViewportZoomLock} from '#/lib/hooks/useViewportZoomLock'
|
import {useViewportZoomLock} from '#/lib/hooks/useViewportZoomLock'
|
||||||
@@ -49,7 +47,7 @@ import {Loader} from '#/components/Loader'
|
|||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {useAnalytics} from '#/analytics'
|
import {useAnalytics} from '#/analytics'
|
||||||
import {IS_INTERNAL, IS_LIQUID_GLASS, IS_WEB} from '#/env'
|
import {IS_INTERNAL, IS_LIQUID_GLASS} from '#/env'
|
||||||
import {ChatDisabled} from './components/ChatDisabled'
|
import {ChatDisabled} from './components/ChatDisabled'
|
||||||
import {ChatEnded} from './components/ChatEnded'
|
import {ChatEnded} from './components/ChatEnded'
|
||||||
import {ChatLocked} from './components/ChatLocked'
|
import {ChatLocked} from './components/ChatLocked'
|
||||||
@@ -105,7 +103,6 @@ function Inner({convoId}: {convoId: string}) {
|
|||||||
const convoState = useConvo()
|
const convoState = useConvo()
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
const {currentAccount} = useSession()
|
const {currentAccount} = useSession()
|
||||||
const isFocused = useIsFocused()
|
|
||||||
const {top: topInset} = useSafeAreaInsets()
|
const {top: topInset} = useSafeAreaInsets()
|
||||||
const {data: convoData} = useConvoQuery({convoId})
|
const {data: convoData} = useConvoQuery({convoId})
|
||||||
|
|
||||||
@@ -154,8 +151,6 @@ function Inner({convoId}: {convoId: string}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout.Center style={[a.flex_1]}>
|
<Layout.Center style={[a.flex_1]}>
|
||||||
{/* MessagesList does not use the body scroll */}
|
|
||||||
{isFocused && IS_WEB && <RemoveScrollBar />}
|
|
||||||
{!readyToShow && (
|
{!readyToShow && (
|
||||||
<View style={IS_LIQUID_GLASS && {paddingTop: topInset}}>
|
<View style={IS_LIQUID_GLASS && {paddingTop: topInset}}>
|
||||||
<MessagesListHeader convo={convo} />
|
<MessagesListHeader convo={convo} />
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {type ScreenLayoutArgs, useIsFocused} from '@react-navigation/native'
|
import {type ScreenLayoutArgs, useIsFocused} from '@react-navigation/native'
|
||||||
import {type NativeStackNavigationProp} from '@react-navigation/native-stack'
|
import {type NativeStackNavigationProp} from '@react-navigation/native-stack'
|
||||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
|
||||||
|
|
||||||
import {type FlatNavigatorParams} from '#/lib/routes/types'
|
import {type FlatNavigatorParams} from '#/lib/routes/types'
|
||||||
import {type NativeStackNavigationOptionsWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
import {type NativeStackNavigationOptionsWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
||||||
@@ -9,6 +8,7 @@ import {atoms as a, useLayoutBreakpoints, useTheme, web} from '#/alf'
|
|||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
|
import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
|
||||||
import {SCROLLBAR_OFFSET} from '#/components/Layout'
|
import {SCROLLBAR_OFFSET} from '#/components/Layout'
|
||||||
|
import {LockScroll} from '#/components/LockScroll'
|
||||||
import {useAgeAssurance} from '#/ageAssurance'
|
import {useAgeAssurance} from '#/ageAssurance'
|
||||||
import {IS_WEB} from '#/env'
|
import {IS_WEB} from '#/env'
|
||||||
import {ChatList, Header as ChatListHeader} from '../../ChatList'
|
import {ChatList, Header as ChatListHeader} from '../../ChatList'
|
||||||
@@ -85,7 +85,7 @@ function MessagesSplitViewLayout({children, navigation, route}: LayoutProps) {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
{isFocused && <RemoveScrollBar />}
|
{isFocused && <LockScroll />}
|
||||||
<SplitViewProvider side="left">
|
<SplitViewProvider side="left">
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
Reference in New Issue
Block a user