Add a threshold of 60px from the bottom to show new messages (#2376)

This commit is contained in:
Elias Nahum 2018-11-27 16:33:50 -03:00 committed by Harrison Healey
parent e36a01267f
commit ef3445d3bc

View file

@ -12,7 +12,14 @@ import PostListBase from './post_list_base';
const INITIAL_BATCH_TO_RENDER = 15;
const SCROLL_UP_MULTIPLIER = 3.5;
const SCROLL_POSITION_CONFIG = {
// To avoid scrolling the list when new messages arrives
// if the user is not at the bottom
minIndexForVisible: 0,
// If the user is at the bottom or 60px from the bottom
// auto scroll show the new message
autoscrollToTopThreshold: 60,
};
export default class PostList extends PostListBase {