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

Migrate SessionRepository to Kotlin flows #1584

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

nielsvanvelzen
Copy link
Member

LiveData is no longer the recommended way for live updates in UI. The kotlinx.coroutine flow API is the way to go. Fortunately we already have a bunch of flows in our code (SDK/some repositories) so the migration should be relatively easy.

Some resources:

This PR migrates the session repository code. Fortunately, most usages on the Java side used ".getValue()" which exists in both livedata & flow, so not many changes were required.

Changes

  • Migrate SessionRepository to Kotlin flows

Issues

@nielsvanvelzen nielsvanvelzen merged commit c45733e into jellyfin:master Apr 1, 2022
@nielsvanvelzen nielsvanvelzen deleted the session-flow branch April 1, 2022 07:41
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