More safeguard

This commit is contained in:
Thomas Ricouard 2022-12-25 18:48:50 +01:00
parent 758fa8a6f9
commit 827e06b26c
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ class TimelineViewModel: ObservableObject, StatusesFetcher {
}
func displayPendingStatuses() {
guard timeline == .home else { return }
statuses.insert(contentsOf: pendingStatuses, at: 0)
pendingStatuses = []
statusesState = .display(statuses: statuses, nextPageState: .hasNextPage)