From dd630abd0e52c9894a3a561ba41c4441c0912434 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 8 Dec 2020 10:48:25 -0500 Subject: [PATCH] Fix issue where scrolling could get stuck. The number of off-screen pages was too small, resulting in the possibility of you still being offscreen after the pages loaded, which could lead to loading more data, which could lead to you still being offscreen, ad infinitum. Simply increasing the number of buffer pages resolves it. Tested by adding an artificial 1 second delay to loading a page. --- .../securesms/conversation/ConversationViewModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationViewModel.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationViewModel.java index 43b85da70d..38956d3224 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationViewModel.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationViewModel.java @@ -93,7 +93,7 @@ class ConversationViewModel extends ViewModel { ConversationDataSource dataSource = new ConversationDataSource(context, data.getThreadId()); PagingConfig config = new PagingConfig.Builder() .setPageSize(25) - .setBufferPages(1) + .setBufferPages(3) .setStartIndex(Math.max(startPosition, 0)) .build();