File tree 2 files changed +1
-4
lines changed
src/modules/GroupChannel/context/hooks
2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import useSendbird from '../../../../lib/Sendbird/context/hooks/useSendbird';
19
19
import { GroupChannelContext } from '../GroupChannelProvider' ;
20
20
import type { GroupChannelState , MessageActions } from '../types' ;
21
21
import { useMessageActions } from './useMessageActions' ;
22
- import { delay } from '../../../../utils/utils' ;
23
22
24
23
export interface GroupChannelActions extends MessageActions {
25
24
// Channel actions
@@ -71,8 +70,6 @@ export const useGroupChannel = () => {
71
70
setAnimatedMessageId ( null ) ;
72
71
setIsScrollBottomReached ( true ) ;
73
72
74
- // wait a bit for scroll ref to be updated
75
- await delay ( ) ;
76
73
if ( config . isOnline && state . hasNext ( ) ) {
77
74
await state . resetWithStartingPoint ( Number . MAX_SAFE_INTEGER ) ;
78
75
}
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export function useMessageActions(params: Params): MessageActions {
102
102
( ) => {
103
103
setTimeout ( scrollToBottom , 0 ) ;
104
104
} ,
105
- [ ] ,
105
+ [ scrollToBottom ] ,
106
106
) ;
107
107
108
108
const processParams = useCallback ( async < T extends keyof MessageParamsByType > (
You can’t perform that action at this time.
0 commit comments