Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change some ObservedObject to StateObject #26

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

PangMo5
Copy link
Member

@PangMo5 PangMo5 commented Jun 1, 2021

View is currently regenerated unwantedly under certain circumstances.
As a result, ViewModel, an ObservedObject, is regenerated and is making problems.
To resolve this issue, I changed it to StateObject, which was introduced in iOS 14.
ex. When the app enters the background and returns to the foreground.

See also: https://developer.apple.com/documentation/swiftui/managing-model-data-in-your-app

@acvigue
Copy link
Member

acvigue commented Jun 1, 2021

lgtm

@acvigue acvigue merged commit 4f8d56b into jellyfin:main Jun 1, 2021
@PangMo5 PangMo5 deleted the PangMo5/apply-StateObject branch July 23, 2021 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants