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

Add in-app screensaver #2539

Merged
merged 3 commits into from
Feb 26, 2023

Conversation

nielsvanvelzen
Copy link
Member

Changes

  • Add option to enable our screensaver in-app (enabled by default)
  • Add option to set timeout before the in-app screensaver starts (5 minutes by default)
  • Remove the "screensaver" from NowPlayingFragment (replaced with the new one that works everywhere in the app)
  • Refactor the LibraryDreamService a bit so we can re-use it's code for the in-app screensaver
  • Add proper translatable plurals for seconds/minutes/hours
    • Add getQuantityString utility
    • Weblate should support this but we'll see what breaks

Issues

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request release-highlight Pull request might be suitable for mentioning in the release blog post labels Feb 25, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Feb 25, 2023
<item quantity="one">%1$s minute</item>
<item quantity="other">%1$s minutes</item>
</plurals>
<plurals name="hours">

Check warning

Code scanning / Android Lint

Unused resources

The resource R.plurals.hours appears to be unused
timer?.cancel()

// Hide when interacted with allowed cancelation or when disabled
if (_visible.value && (canCancel || !enabled || activityPaused)) {

Check warning

Code scanning / detekt

Complex conditions should be simplified and extracted into well-named methods if necessary.

This condition is too complex (4). Defined complexity threshold for conditions is set to '4'

AnimatedVisibility(
visible = visible,
enter = fadeIn(tween(1_000)),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

This expression contains a magic number. Consider defining it to a well named constant.
AnimatedVisibility(
visible = visible,
enter = fadeIn(tween(1_000)),
exit = fadeOut(tween(1_000)),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

This expression contains a magic number. Consider defining it to a well named constant.
@nielsvanvelzen nielsvanvelzen merged commit 231a54a into jellyfin:master Feb 26, 2023
@nielsvanvelzen nielsvanvelzen deleted the nowplaying-screensaver branch February 27, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release-highlight Pull request might be suitable for mentioning in the release blog post
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant