Skip to content

Commit

Permalink
Enable Pull to refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
hartlco committed Dec 1, 2021
1 parent abc066e commit 307b103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions IcroKit/ViewModel/ListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public class ListViewModel: NSObject {
Task {
do {
let value = try await client.load(resource: type.resource)
self.isLoading = false

DispatchQueue.main.async {
self.updateShowLoadMoreInBetweenAfterLoadMore(loadedNewItems: value.items)
Expand All @@ -127,6 +128,7 @@ public class ListViewModel: NSObject {
}
} catch {
DispatchQueue.main.async {
self.isLoading = false
self.didFinishWithError(error)
}
}
Expand Down

0 comments on commit 307b103

Please sign in to comment.