Fix possible context crash.

master
Greyson Parrelli 2019-11-12 09:24:07 -05:00 committed by Alan Evans
parent a7dd78cce6
commit a0dfd42527
1 changed files with 2 additions and 1 deletions

View File

@ -323,8 +323,9 @@ public class ConversationFragment extends Fragment
if (recipients.size() > 0) {
if (!isTypingIndicatorShowing() && isAtBottom()) {
Context context = requireContext();
list.setVerticalScrollBarEnabled(false);
list.post(() -> getListLayoutManager().smoothScrollToPosition(requireContext(), 0, 250));
list.post(() -> getListLayoutManager().smoothScrollToPosition(context, 0, 250));
list.postDelayed(() -> list.setVerticalScrollBarEnabled(true), 300);
adapter.setHeaderView(typingView);
adapter.notifyItemInserted(0);