prevent message modal scrolling on message arrive
This commit is contained in:
parent
ca615eb9d9
commit
652b33ec51
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue