SwiftUI has a unique way of support Pull to Refresh. To enable the feature you need to support the refreshable view modifier with takes an async closure. The refresh "task" run and when it completes, SwiftUI will then refresh the view.
The problem we run into with VSM is that when using the existing observable functions inside the refreshable async task, state gets updated before the task completes. This then causes a complete refresh of the view which has two side effects:
It cancels the refreshable task
The update causes the entire view to "snap into place" which is VERY jarring to see as a user. Instead of the content smoothly animating back up into place it snaps right into position.
Description
SwiftUI has a unique way of support Pull to Refresh. To enable the feature you need to support the
refreshable
view modifier with takes an async closure. The refresh "task" run and when it completes, SwiftUI will then refresh the view.The problem we run into with VSM is that when using the existing observable functions inside the refreshable async task, state gets updated before the task completes. This then causes a complete refresh of the view which has two side effects:
What this PR does is adds a new "
Type of Change
Checklist