Fix trending timeline resetting to first page

This commit is contained in:
Thomas Ricouard 2023-02-16 07:22:26 +01:00
parent 40ca3940f6
commit 3843d18f2f

View file

@ -156,6 +156,9 @@ extension TimelineViewModel: StatusesFetcher {
guard let client else { return }
do {
if statuses.isEmpty || timeline == .trending {
if !statuses.isEmpty && timeline == .trending {
return
}
try await fetchFirstPage(client: client)
} else if let latest = statuses.first {
try await fetchNewPagesFrom(latestStatus: latest, client: client)