From dc899bdb7d27c8902916e0c3ed3c172b3b2be5f1 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 8 May 2022 10:40:30 +0200 Subject: [PATCH] Fix issue with the bad position for written statuses added in timelines --- .../android/ui/fragment/timeline/FragmentMastodonContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java index c8480b7c..a9dfa19b 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java @@ -108,8 +108,8 @@ public class FragmentMastodonContext extends Fragment { int i = 0; for (Status status : statuses) { if (status.id.equals(convertStatus.in_reply_to_id)) { - statuses.add(i, convertStatus); - statusAdapter.notifyItemInserted(i); + statuses.add((i + 1), convertStatus); + statusAdapter.notifyItemInserted((i + 1)); if (requireActivity() instanceof ContextActivity) { //Redraw decorations statusAdapter.notifyItemRangeChanged(0, statuses.size());