Skip to content

Commit

Permalink
Fixing call to load more during update in PagingView
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdsupremacist committed Jan 6, 2021
1 parent 0c2cfea commit dece962
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import Foundation
import Stencil

struct StructureAPI: SwiftCodeTransformable, Hashable {
let version = 1
let version = 2
}
4 changes: 3 additions & 1 deletion templates/swift/StructureAPI.swift.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ struct PagingView<Value: Fragment>: View {
case let .item(_, index) = data,
index > paging.values.count - 2 else { return }

paging.loadMore(pageSize: pageSize)
DispatchQueue.main.async {
paging.loadMore(pageSize: pageSize)
}
}
}

Expand Down

0 comments on commit dece962

Please sign in to comment.