-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Labels
Description
Issue
Describe your issue here
When i add a image attachment to a conversation, the image is not filling the bubble like the sample app.
Steps to reproduce
Steps to reproduce the behavior:
I use the same code for the channel screen as the sample app
import { useRouter } from "expo-router";
import React, { useEffect } from "react";
import { StyleSheet, View } from "react-native";
import {
Channel,
MessageInput,
MessageList,
useAttachmentPickerContext,
useTheme,
} from "stream-chat-expo";
import { ChannelHeader } from "@/components/chat/channel/ChannelHeader";
import { Spinner } from "@/components/ui/spinner";
import { useStreamChat } from "@/hooks/useStreamChat";
import { useHeaderHeight } from "@react-navigation/elements";
import { useSafeAreaInsets } from "react-native-safe-area-context";
export default function ChannelScreen() {
const router = useRouter();
const { setThread, channel } = useStreamChat();
const { setTopInset } = useAttachmentPickerContext();
const headerHeight = useHeaderHeight();
const { bottom } = useSafeAreaInsets();
const {
theme: {
colors: { white },
},
} = useTheme();
useEffect(() => {
setTopInset(headerHeight);
}, [headerHeight, setTopInset]);
if (!channel) {
return (
<View
style={{
flex: 1,
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
<Spinner />
</View>
);
}
return (
<View
style={[styles.flex, { backgroundColor: white, paddingBottom: bottom }]}
>
<Channel
audioRecordingEnabled={true}
channel={channel}
keyboardVerticalOffset={headerHeight}
>
<ChannelHeader channel={channel}></ChannelHeader>
<MessageList
onThreadSelect={(thread) => {
setThread(thread);
router.push(`/channel/${channel.cid}/thread/${thread!.cid}`);
}}
/>
<MessageInput />
</Channel>
</View>
);
}
const styles = StyleSheet.create({
flex: { flex: 1 },
});
Expected behavior
Project Related Information
Customization
Click To Expand
# N/A
Offline support
- I have enabled offline support.
- The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)
Environment
Click To Expand
package.json
:
# N/A
react-native info
output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
stream-chat-react-native
version you're using that has this issue:e.g. 5.4.3
- Device/Emulator info:
- I am using a physical device
- OS version:
e.g. Android 10
- Device/Emulator:
e.g. iPhone 11
Additional context
Screenshots
Click To Expand