-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only mutate ManagedPlayerViewModel.loadingState on main thread (#566)
Published properties in SwiftUI models should not be mutated on background threads. Refactor `ManagedPlayerViewModel.next` to ensure all paths that update `loadingState` do so from the main thread. Add unit tests to verify loadingState changes arrive on the main thread when next is called. Co-authored-by: Harris Borawski <[email protected]>
- Loading branch information
1 parent
16f2a50
commit cb3ea0c
Showing
2 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters