Files
Nikhil KothariandGitHub 72603e8e31 fix(mobile): chat input position, text overlap on reply message block, prevent thread within thread (#1634)
* fix(mobile): prevent creation of thread within thread

* fix(mobile): chat input placement

* chore: bump legendlist version

* fix(mobile): reply message box file length not breaking
2025-04-20 15:23:11 +05:30

37 lines
1.5 KiB
TypeScript

import { BottomSheetModal, BottomSheetView } from "@gorhom/bottom-sheet";
import MessageActions from './MessageActions';
import { Message } from '@raven/types/common/Message';
import { Sheet } from "@components/nativewindui/Sheet";
import { View } from "react-native";
import { useAtomValue } from "jotai";
import { quickReactionEmojisAtom } from "@lib/preferences";
interface MessageActionsBottomSheetProps {
messageActionsSheetRef: React.RefObject<BottomSheetModal>
message: Message | null
handleClose: () => void,
isThread?: boolean
}
const MessageActionsBottomSheet: React.FC<MessageActionsBottomSheetProps> = ({ messageActionsSheetRef, message, handleClose, isThread = false }) => {
// Loading this here since the app crashes if it's loaded inside the sheet
// App crash message: "Handler for tag <number> does not exist"
const quickReactionEmojis = useAtomValue(quickReactionEmojisAtom)
return (
<Sheet ref={messageActionsSheetRef} snapPoints={['60%']} onDismiss={handleClose}>
<BottomSheetView>
<View className="flex-col px-4 mt-2 pb-16">
{message && <MessageActions
message={message}
quickReactionEmojis={quickReactionEmojis}
onClose={handleClose}
isThread={isThread} />}
</View>
</BottomSheetView>
</Sheet>
)
}
export default MessageActionsBottomSheet