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

Use AsyncImageView in ClockUserView #1966

Merged
merged 2 commits into from
Aug 14, 2022

Conversation

nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented Aug 13, 2022

We prefer AsyncImageView for displaying (networked) images since it allows us to easily set the fallback/blurhash and moves all Glide code to a single place. This PR migrates the ClockUserView.

Changes

  • Support circle crop in AsyncImageView
  • Use AsyncImageView in ClockUserView

Issues

@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Aug 13, 2022
@nielsvanvelzen nielsvanvelzen marked this pull request as draft August 13, 2022 12:49
@nielsvanvelzen nielsvanvelzen marked this pull request as ready for review August 13, 2022 13:03
// FIXME: Glide is unable to scale the image when transitions are enabled
//.transition(DrawableTransitionOptions.withCrossFade(crossFadeDuration.inWholeMilliseconds.toInt()))
.load(url ?: placeholder).apply {
placeholder(placeholderOrBlurHash)

Check warning

Code scanning / Android Lint

Ignoring results

The result of placeholder is not used
//.transition(DrawableTransitionOptions.withCrossFade(crossFadeDuration.inWholeMilliseconds.toInt()))
.load(url ?: placeholder).apply {
placeholder(placeholderOrBlurHash)
error(placeholder)

Check warning

Code scanning / Android Lint

Ignoring results

The result of error is not used
.load(url ?: placeholder).apply {
placeholder(placeholderOrBlurHash)
error(placeholder)
if (circleCrop) circleCrop()

Check warning

Code scanning / Android Lint

Ignoring results

The result of circleCrop is not used
@nielsvanvelzen nielsvanvelzen added the refactor Improvements to code realiability, readability and quality label Aug 13, 2022
@nielsvanvelzen nielsvanvelzen merged commit a682757 into jellyfin:master Aug 14, 2022
@nielsvanvelzen nielsvanvelzen deleted the clock-asyncimageview branch August 14, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvements to code realiability, readability and quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants