mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 23:50:36 +00:00
Timeline: Check for task cancellation before loading next page
This commit is contained in:
parent
0f8c481bcb
commit
8c4b286751
1 changed files with 3 additions and 1 deletions
|
@ -304,7 +304,9 @@ extension TimelineViewModel: StatusesFetcher {
|
|||
var allStatuses: [Status] = []
|
||||
var latestMinId = minId
|
||||
do {
|
||||
while var newStatuses: [Status] =
|
||||
while
|
||||
!Task.isCancelled,
|
||||
var newStatuses: [Status] =
|
||||
try await client.get(endpoint: timeline.endpoint(sinceId: nil,
|
||||
maxId: nil,
|
||||
minId: latestMinId,
|
||||
|
|
Loading…
Reference in a new issue