Fix issue crash with PixelFed

This commit is contained in:
Thomas 2022-05-17 15:03:37 +02:00
parent 9c64ff054c
commit df66bfcfdc

View file

@ -640,11 +640,15 @@ public class FragmentMastodonTimeline extends Fragment {
timelinesVM.getMarker(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, markers).observe(getViewLifecycleOwner(), marker -> { timelinesVM.getMarker(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, markers).observe(getViewLifecycleOwner(), marker -> {
if (marker != null) { if (marker != null) {
Marker.MarkerContent markerContent = marker.home; Marker.MarkerContent markerContent = marker.home;
if (markerContent != null) {
max_id = markerContent.last_read_id; max_id = markerContent.last_read_id;
min_id = markerContent.last_read_id; min_id = markerContent.last_read_id;
} else { } else {
max_id = null; max_id = null;
} }
} else {
max_id = null;
}
timelinesVM.getHome(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, max_id, null, null, MastodonHelper.statusesPerCall(requireActivity()), false) timelinesVM.getHome(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, max_id, null, null, MastodonHelper.statusesPerCall(requireActivity()), false)
.observe(getViewLifecycleOwner(), this::initializeStatusesCommonView); .observe(getViewLifecycleOwner(), this::initializeStatusesCommonView);
}); });