prevent message modal scrolling on message arrive

This commit is contained in:
Nuwan 2024-10-18 23:29:27 +05:30
parent ca615eb9d9
commit 652b33ec51
1 changed files with 3 additions and 3 deletions

View File

@ -47,9 +47,9 @@ const JKMessageModal = props => {
const options = { userId: user.id, offset: offset, limit: LIMIT };
setFetching(true);
await dispatch(fetchMessagesByReceiverId(options)).unwrap();
if(messages.length < LIMIT){
goToBottom();
}
// if(messages.length < LIMIT){
// goToBottom();
// }
} catch (err) {
console.error('Error when fetching messages', err);
} finally {