Skip to content

Commit

Permalink
#10
Browse files Browse the repository at this point in the history
  • Loading branch information
Amzd committed Jan 4, 2021
1 parent 5317b3d commit a72743a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/ScrollViewProxy/ScrollViewProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ public struct ScrollViewReader<Content: View>: View {
// https://stackoverflow.com/a/61765994/3019595
}
.introspectScrollView {
self.proxy.coordinator.scrollView = $0
self.proxy.offset = $0.offsetPublisher
if self.proxy.coordinator.scrollView != $0 {
self.proxy.coordinator.scrollView = $0
self.proxy.offset = $0.offsetPublisher
}
}
}
}
Expand Down

0 comments on commit a72743a

Please sign in to comment.