File tree 1 file changed +8
-1
lines changed
src/modules/GroupChannel/components/MessageList
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';
19
19
import { deleteNullish } from '../../../../utils/utils' ;
20
20
import { getMessagePartsInfo } from './getMessagePartsInfo' ;
21
21
import { MessageProvider } from '../../../Message/context/MessageProvider' ;
22
- import { getComponentKeyFromMessage } from '../../context/utils' ;
22
+ import { getComponentKeyFromMessage , isContextMenuClosed } from '../../context/utils' ;
23
23
import { InfiniteList } from './InfiniteList' ;
24
24
25
25
export interface GroupChannelMessageListProps {
@@ -225,13 +225,20 @@ export const MessageList = (props: GroupChannelMessageListProps) => {
225
225
226
226
const TypingIndicatorBubbleWrapper = ( props : { handleScroll : ( ) => void ; channelUrl : string } ) => {
227
227
const { stores } = useSendbirdStateContext ( ) ;
228
+ const { isScrollBottomReached, scrollPubSub } = useGroupChannelContext ( ) ;
228
229
const [ typingMembers , setTypingMembers ] = useState < Member [ ] > ( [ ] ) ;
229
230
230
231
useGroupChannelHandler ( stores . sdkStore . sdk , {
231
232
onTypingStatusUpdated ( channel ) {
232
233
if ( channel . url === props . channelUrl ) {
233
234
setTypingMembers ( channel . getTypingUsers ( ) ) ;
234
235
}
236
+
237
+ if ( isScrollBottomReached && isContextMenuClosed ( ) ) {
238
+ setTimeout ( ( ) => {
239
+ scrollPubSub . publish ( 'scrollToBottom' , { } ) ;
240
+ } , 10 ) ;
241
+ }
235
242
} ,
236
243
} ) ;
237
244
You can’t perform that action at this time.
0 commit comments