From cdf91d7d2ac81503b9b040b8de7b56023560e665 Mon Sep 17 00:00:00 2001 From: OrynaPanchenko <98828331+OrynaPanchenko@users.noreply.github.com> Date: Tue, 7 Mar 2023 12:32:11 +0200 Subject: [PATCH] fixed publishing ui changes on the main thread --- Sources/Refresher/Refresher.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Refresher/Refresher.swift b/Sources/Refresher/Refresher.swift index f50bc67..6fd9a0d 100644 --- a/Sources/Refresher/Refresher.swift +++ b/Sources/Refresher/Refresher.swift @@ -215,7 +215,9 @@ public struct RefreshableScrollView: View { } } .introspectScrollView { scrollView in - uiScrollView = scrollView + DispatchQueue.main.async { + uiScrollView = scrollView + } } .onChange(of: globalGeometry.frame(in: .global)) { val in headerInset = val.minY