Prevent crash when ConversationListFragment list is nullified.
This commit is contained in:
parent
f85803c1fe
commit
60b6a9ff3f
1 changed files with 4 additions and 0 deletions
|
@ -764,6 +764,10 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
int firstVisibleItem = layoutManager != null ? layoutManager.findFirstCompletelyVisibleItemPosition() : -1;
|
||||
|
||||
defaultAdapter.submitList(conversations, () -> {
|
||||
if (list == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (firstVisibleItem == 0) {
|
||||
list.scrollToPosition(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue