File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/modules/Channel/components/MessageList Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { MessageProvider } from '../../../Message/context/MessageProvider';
1818import { useHandleOnScrollCallback } from '../../../../hooks/useHandleOnScrollCallback' ;
1919import { useSetScrollToBottom } from './hooks/useSetScrollToBottom' ;
2020import { useScrollBehavior } from './hooks/useScrollBehavior' ;
21+ import * as utils from '../../context/utils' ;
2122
2223const SCROLL_BOTTOM_PADDING = 50 ;
2324
@@ -87,6 +88,13 @@ const MessageList: React.FC<MessageListProps> = ({
8788 onScrollDownCallback ( ( [ messages ] ) => {
8889 if ( messages ) {
8990 try {
91+ setTimeout ( ( ) => utils . scrollIntoLast ( 0 , scrollRef ) ,
92+ /**
93+ * Rendering MFM takes long time so we need this.
94+ * But later we should find better solution.
95+ */
96+ 1000 ,
97+ ) ;
9098 // element.scrollTop = scrollHeight - clientHeight;
9199 // scrollRef.current.scrollTop = scrollHeight - clientHeight;
92100 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments