Fix pagination on profiles

This commit is contained in:
Thomas 2022-10-25 10:32:10 +02:00
parent b340ed25c7
commit f3422871bc
1 changed files with 2 additions and 2 deletions

View File

@ -508,9 +508,9 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
for (Status statusAlreadyPresent : timelineStatuses) {
//We compare the id of each status and we only add status having an id greater than the another, it is inserted at this position
//Pinned messages are ignored because their date can be older
if (statusReceived.id.compareTo(statusAlreadyPresent.id) > 0) {
if (statusReceived.id.compareTo(statusAlreadyPresent.id) > 0 && !statusAlreadyPresent.pinned) {
//We add the status to a list of id - thus we know it is already in the timeline
if (!timelineStatuses.contains(statusReceived) && !statusReceived.pinned && timelineType != Timeline.TimeLineEnum.ACCOUNT_TIMELINE) {
if (!timelineStatuses.contains(statusReceived)) {
timelineStatuses.add(position, statusReceived);
statusAdapter.notifyItemInserted(position);
if (!statusReceived.cached) {