Skip to content

Commit

Permalink
fixed publishing ui changes on the main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
OrynaSemenets committed Mar 7, 2023
1 parent 245beb2 commit cdf91d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Refresher/Refresher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ public struct RefreshableScrollView<Content: View, RefreshView: View>: View {
}
}
.introspectScrollView { scrollView in
uiScrollView = scrollView
DispatchQueue.main.async {
uiScrollView = scrollView
}
}
.onChange(of: globalGeometry.frame(in: .global)) { val in
headerInset = val.minY
Expand Down

0 comments on commit cdf91d7

Please sign in to comment.