Fix visible duplicated status in same portion of data:

This commit is contained in:
Marcin Czachurski 2023-10-23 09:26:52 +02:00
parent 8309cdecbd
commit 1af66b189d
1 changed files with 6 additions and 1 deletions

View File

@ -95,11 +95,16 @@ public class HomeTimelineService {
continue
}
// Same rebloged status has been already visible in current portion of data.
// Same rebloged status has been already visible in already processed (visible) portion of data.
if let reblog = status.reblog, visibleStatuses.contains(where: { $0.reblog?.id == reblog.id || $0.id == reblog.id }) {
continue
}
// Same rebloged (orginal) status will be added to visible in same portion of data.
if let reblog = status.reblog, statusesWithImagesOnly.contains(where: { $0.id == reblog.id }) {
continue
}
visibleStatuses.append(status)
}