From df66bfcfdca7783a4162279065b23dea16fb8439 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 17 May 2022 15:03:37 +0200 Subject: [PATCH] Fix issue crash with PixelFed --- .../ui/fragment/timeline/FragmentMastodonTimeline.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java index bfbe70cb..d2263bd7 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java @@ -640,8 +640,12 @@ public class FragmentMastodonTimeline extends Fragment { timelinesVM.getMarker(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, markers).observe(getViewLifecycleOwner(), marker -> { if (marker != null) { Marker.MarkerContent markerContent = marker.home; - max_id = markerContent.last_read_id; - min_id = markerContent.last_read_id; + if (markerContent != null) { + max_id = markerContent.last_read_id; + min_id = markerContent.last_read_id; + } else { + max_id = null; + } } else { max_id = null; }