From ef3445d3bcc36610846f0857f5acb397188dbf02 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 27 Nov 2018 16:33:50 -0300 Subject: [PATCH] Add a threshold of 60px from the bottom to show new messages (#2376) --- app/components/post_list/post_list.ios.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/components/post_list/post_list.ios.js b/app/components/post_list/post_list.ios.js index 78df6e774..4be27931f 100644 --- a/app/components/post_list/post_list.ios.js +++ b/app/components/post_list/post_list.ios.js @@ -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 {