Skip to content

Commit

Permalink
Merge branch 'main' into release/v3.15.11
Browse files Browse the repository at this point in the history
  • Loading branch information
HoonBaek authored Dec 19, 2024
2 parents 1068190 + 146ba9c commit cd3f10f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/GroupChannel/components/MessageList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { GroupChannelUIBasicProps } from '../GroupChannelUI/GroupChannelUIView';
import { deleteNullish } from '../../../../utils/utils';
import { getMessagePartsInfo } from './getMessagePartsInfo';
import { MessageProvider } from '../../../Message/context/MessageProvider';
import { getComponentKeyFromMessage } from '../../context/utils';
import { getComponentKeyFromMessage, isContextMenuClosed } from '../../context/utils';
import { InfiniteList } from './InfiniteList';

export interface GroupChannelMessageListProps {
Expand Down Expand Up @@ -225,13 +225,20 @@ export const MessageList = (props: GroupChannelMessageListProps) => {

const TypingIndicatorBubbleWrapper = (props: { handleScroll: () => void; channelUrl: string }) => {
const { stores } = useSendbirdStateContext();
const { isScrollBottomReached, scrollPubSub } = useGroupChannelContext();
const [typingMembers, setTypingMembers] = useState<Member[]>([]);

useGroupChannelHandler(stores.sdkStore.sdk, {
onTypingStatusUpdated(channel) {
if (channel.url === props.channelUrl) {
setTypingMembers(channel.getTypingUsers());
}

if (isScrollBottomReached && isContextMenuClosed()) {
setTimeout(() => {
scrollPubSub.publish('scrollToBottom', {});
}, 10);
}
},
});

Expand Down

0 comments on commit cd3f10f

Please sign in to comment.