Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

단순 궁금증인데 isContextMenuClosed() 이거는 어떤 이유에서 체크가 필요한건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유저가 메시지의 메뉴를 열고있는 상태에서 스크롤이 발생하는 동작이 어색하기 때문입니다!
image

setTimeout(() => {
scrollPubSub.publish('scrollToBottom', {});
}, 10);
}
},
});

Expand Down