@@ -6,11 +6,19 @@ import { DoubleDownArrow } from '../common/Icons';
66import Pressable from '../common/Pressable' ;
77import ApplicationColors from '../config/appColors' ;
88import config from '../config/config' ;
9- import { calculateOffset , getUserIdFromJid , handleConversationScollToBottom } from '../helpers/chatHelpers' ;
9+ import {
10+ calculateOffset ,
11+ getReplyScrollmsgId ,
12+ getUserIdFromJid ,
13+ handleConversationScollToBottom ,
14+ setReplyScrollmsgId ,
15+ } from '../helpers/chatHelpers' ;
1016import { CHAT_TYPE_GROUP , NOTIFICATION } from '../helpers/constants' ;
1117import { useChatMessages , useThemeColorPalatte } from '../redux/reduxHook' ;
1218import { getCurrentUserJid } from '../uikitMethods' ;
1319import ChatMessage from './ChatMessage' ;
20+ import store from '../redux/store' ;
21+ import { highlightMessage } from '../redux/chatMessageDataSlice' ;
1422
1523export const conversationFlatListRef = createRef ( ) ;
1624conversationFlatListRef . current = { } ;
@@ -147,6 +155,12 @@ const ConversationList = ({ chatUser }) => {
147155 disableVirtualization = { true }
148156 scrollEventThrottle = { 16 }
149157 windowSize = { 5 }
158+ onMomentumScrollEnd = { ( ) => {
159+ setTimeout ( ( ) => {
160+ store . dispatch ( highlightMessage ( { userId, msgId : getReplyScrollmsgId ( ) , shouldHighlight : 0 } ) ) ;
161+ setReplyScrollmsgId ( null ) ;
162+ } , 1000 ) ;
163+ } }
150164 onEndReached = { handleLoadMore }
151165 onEndReachedThreshold = { 0.5 }
152166 onScroll = { handleScroll }
0 commit comments