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

Replace Glide with Coil #2889

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Conversation

nielsvanvelzen
Copy link
Member

There are a bunch of image loading libraries for Android and we've previously used Picasso and currently Glide only. It works well but the development is slow and there are some issues that are not being worked on.

Coil builds on top of modern Android standards like lifecycles and is Kotlin-first, just like our app. It fixes some issues and on top of that the performance is noticeably improved compared to our Glide implementation (try scrolling fast trough a library).

Changes

  • Replace Glide with Coil
  • Simplify profile picture in home fragment by using the AsyncImageView (same as in ClockUserView)
  • Remove KSP as it is no longer needed

Issues

Fixes #2018

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Jul 10, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Jul 10, 2023
@@ -62,7 +64,7 @@
)
}

private suspend fun getRandomLibraryShowcase(api: ApiClient, context: Context): DreamContent.LibraryShowcase? {
private suspend fun getRandomLibraryShowcase(api: ApiClient, imageLoader: ImageLoader, context: Context): DreamContent.LibraryShowcase? {

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> Bitmap.CompressFormat.WEBP_LOSSY
else -> Bitmap.CompressFormat.WEBP
}
drawable.toBitmap().compress(format, 95, outputStream)

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. Warning

This expression contains a magic number. Consider defining it to a well named constant.
@nielsvanvelzen nielsvanvelzen merged commit 387baf9 into jellyfin:master Jul 11, 2023
6 checks passed
@nielsvanvelzen nielsvanvelzen deleted the coil2 branch July 11, 2023 19:21
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.

Covers can't display when connet to an IPV6 server.
2 participants