Timeline: Do nothing if no new statuses

This commit is contained in:
Thomas Ricouard 2023-01-31 13:19:32 +01:00
parent e512453cfe
commit 62b26fdbb7
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ class TimelineViewModel: ObservableObject, StatusesFetcher {
newStatuses = newStatuses.filter { status in
!statuses.contains(where: { $0.id == status.id })
}
guard !newStatuses.isEmpty else { return }
pendingStatusesObserver.pendingStatuses.insert(contentsOf: newStatuses.map{ $0.id }, at: 0)
pendingStatusesObserver.feedbackGenerator.impactOccurred()