From a14962d977fd03f58b19164e51389c6d0436bb8d Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 8 Oct 2022 18:00:22 +0200 Subject: [PATCH] Fix counters --- .../android/ui/fragment/timeline/FragmentMastodonTimeline.java | 2 ++ 1 file changed, 2 insertions(+) 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 ac0a7564..598e4d54 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 @@ -326,6 +326,8 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. //For these directions, the app will display counters for new messages if (insertedStatus >= 0 && update != null && direction != DIRECTION.FETCH_NEW && !fetchingMissing) { update.onUpdate(insertedStatus, timelineType, slug); + } else if (update != null && insertedStatus == 0 && direction == DIRECTION.REFRESH) { + update.onUpdate(0, timelineType, slug); } if (direction == DIRECTION.TOP && fetchingMissing) { binding.recyclerView.scrollToPosition(getPosition(fetched_statuses.statuses.get(fetched_statuses.statuses.size() - 1)) + 1);