Timeline: Check for task cancellation before loading next page
This commit is contained in:
parent
0f8c481bcb
commit
8c4b286751
|
@ -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 New Issue