File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/modules/GroupChannel/components/MessageList Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { GroupChannelUIBasicProps } from '../GroupChannelUI/GroupChannelUIView';
1919import { deleteNullish } from '../../../../utils/utils' ;
2020import { getMessagePartsInfo } from './getMessagePartsInfo' ;
2121import { MessageProvider } from '../../../Message/context/MessageProvider' ;
22- import { getComponentKeyFromMessage } from '../../context/utils' ;
22+ import { getComponentKeyFromMessage , isContextMenuClosed } from '../../context/utils' ;
2323import { InfiniteList } from './InfiniteList' ;
2424
2525export interface GroupChannelMessageListProps {
@@ -225,13 +225,20 @@ export const MessageList = (props: GroupChannelMessageListProps) => {
225225
226226const TypingIndicatorBubbleWrapper = ( props : { handleScroll : ( ) => void ; channelUrl : string } ) => {
227227 const { stores } = useSendbirdStateContext ( ) ;
228+ const { isScrollBottomReached, scrollPubSub } = useGroupChannelContext ( ) ;
228229 const [ typingMembers , setTypingMembers ] = useState < Member [ ] > ( [ ] ) ;
229230
230231 useGroupChannelHandler ( stores . sdkStore . sdk , {
231232 onTypingStatusUpdated ( channel ) {
232233 if ( channel . url === props . channelUrl ) {
233234 setTypingMembers ( channel . getTypingUsers ( ) ) ;
234235 }
236+
237+ if ( isScrollBottomReached && isContextMenuClosed ( ) ) {
238+ setTimeout ( ( ) => {
239+ scrollPubSub . publish ( 'scrollToBottom' , { } ) ;
240+ } , 10 ) ;
241+ }
235242 } ,
236243 } ) ;
237244
You can’t perform that action at this time.
0 commit comments