From 3843d18f2f7b7dc78d472d49001d758133608c99 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Thu, 16 Feb 2023 07:22:26 +0100 Subject: [PATCH] Fix trending timeline resetting to first page --- Packages/Timeline/Sources/Timeline/TimelineViewModel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift index 1cfec911..37563c65 100644 --- a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift +++ b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift @@ -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)