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

Rewrite LibraryDreamService with Compose #2498

Merged

Conversation

nielsvanvelzen
Copy link
Member

Originally made these changes about 5 months ago but for some reason never made the PR 🤷. Some future plans I have for the screensaver:

  • Add now playing info for current playing music
  • Add lyrics for current playing music (10.9)
  • Replace the current fake screensaver in the NowPlayingFragment with this one

Changes

  • Add DreamServiceCompat which extends DreamService to support lifecycles and a compose view
  • Rewrite LibraryDreamService with compose
    • Looks the same, only change is the ken burns effect which I replaced with a zoom effect because I didn't want to write a custom ken burns implementation
  • Remove old daydream layout stuff
  • Remove KenBurns dependency

Issues

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request refactor Improvements to code realiability, readability and quality labels Feb 14, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Feb 14, 2023
@nielsvanvelzen nielsvanvelzen removed the refactor Improvements to code realiability, readability and quality label Feb 14, 2023
Comment on lines +20 to +28
fun AsyncImage(
modifier: Modifier = Modifier,
url: String? = null,
blurHash: String? = null,
placeholder: Drawable? = null,
aspectRatio: Double = 1.0,
blurHashResolution: Int = 32,
scaleType: ImageView.ScaleType? = null,
) {

Check warning

Code scanning / detekt

The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists.

The function AsyncImage(modifier: Modifier, url: String?, blurHash: String?, placeholder: Drawable?, aspectRatio: Double, blurHashResolution: Int, scaleType: ImageView.ScaleType?) has too many parameters. The current threshold is set to 6.
@nielsvanvelzen nielsvanvelzen force-pushed the compose-librarydreamservice branch from ff22b21 to 5ffa475 Compare February 14, 2023 18:48
@nielsvanvelzen nielsvanvelzen merged commit 2846d7f into jellyfin:master Feb 16, 2023
@nielsvanvelzen nielsvanvelzen deleted the compose-librarydreamservice branch February 18, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant