mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-10 10:58:35 +00:00
Fix issue where invalid PagedList objects were passed to ConversationAdapter.
This commit is contained in:
parent
a758056494
commit
e04f76b558
@ -219,9 +219,11 @@ public class ConversationFragment extends Fragment {
|
||||
|
||||
this.conversationViewModel = ViewModelProviders.of(requireActivity(), new ConversationViewModel.Factory()).get(ConversationViewModel.class);
|
||||
conversationViewModel.getMessages().observe(this, list -> {
|
||||
if (getListAdapter() != null) {
|
||||
if (getListAdapter() != null && !list.getDataSource().isInvalid()) {
|
||||
Log.i(TAG, "submitList");
|
||||
getListAdapter().submitList(list);
|
||||
} else if (list.getDataSource().isInvalid()) {
|
||||
Log.i(TAG, "submitList skipped an invalid list");
|
||||
}
|
||||
});
|
||||
conversationViewModel.getConversationMetadata().observe(this, data -> deferred.defer(() -> presentConversationMetadata(data)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user