mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-23 00:40:59 +00:00
Fix trending timeline resetting to first page
This commit is contained in:
parent
40ca3940f6
commit
3843d18f2f
1 changed files with 3 additions and 0 deletions
|
@ -156,6 +156,9 @@ extension TimelineViewModel: StatusesFetcher {
|
||||||
guard let client else { return }
|
guard let client else { return }
|
||||||
do {
|
do {
|
||||||
if statuses.isEmpty || timeline == .trending {
|
if statuses.isEmpty || timeline == .trending {
|
||||||
|
if !statuses.isEmpty && timeline == .trending {
|
||||||
|
return
|
||||||
|
}
|
||||||
try await fetchFirstPage(client: client)
|
try await fetchFirstPage(client: client)
|
||||||
} else if let latest = statuses.first {
|
} else if let latest = statuses.first {
|
||||||
try await fetchNewPagesFrom(latestStatus: latest, client: client)
|
try await fetchNewPagesFrom(latestStatus: latest, client: client)
|
||||||
|
|
Loading…
Reference in a new issue