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 image loading from Picasso to Coil #11201

Merged
merged 11 commits into from
Jul 3, 2024

Conversation

Isira-Seneviratne
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne commented Jun 22, 2024

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Migrate the image loading functionality from Picasso to Coil. Picasso has not had a new release for some time, and it has been recommended to move to other libraries. Coil also allows the notification icon loading to be greatly simplified, and it provides default configurations for its memory and disk caches.
  • Remove the image indicator toggle from the settings as Coil does not have that functionality. Logging has been enabled instead for debug builds.
  • Enable RGB-565 support for low-RAM devices only.
  • This change is needed for PR Migrate comment fragments to Jetpack Compose #11060 as it makes use of Coil's Compose functionality.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/giant PRs with more than 750 changed lines label Jun 22, 2024
@TobiGr TobiGr added the dependency Issues and PRs related to dependencies label Jun 22, 2024
@Isira-Seneviratne Isira-Seneviratne marked this pull request as draft June 22, 2024 09:35
@Isira-Seneviratne Isira-Seneviratne marked this pull request as ready for review June 22, 2024 11:35
@Isira-Seneviratne Isira-Seneviratne changed the base branch from dev to refactor June 22, 2024 12:00
@opusforlife2
Copy link
Collaborator

Enable RGB-565 support for low-RAM devices only.

Thank you for thinking of low-RAM devices. ❤️

@Isira-Seneviratne
Copy link
Member Author

Enable RGB-565 support for low-RAM devices only.

Thank you for thinking of low-RAM devices. ❤️

I initially enabled it for all devices, but changed that as the documentation recommends it for low-RAM devices only.

@opusforlife2
Copy link
Collaborator

What's the threshold, BTW? 3GB?

@Isira-Seneviratne
Copy link
Member Author

What's the threshold, BTW? 3GB?

It depends on the device configuration, according to the documentation, but it's generally 1 GB.

Copy link

sonarcloud bot commented Jul 3, 2024

@Isira-Seneviratne Isira-Seneviratne merged commit 73e3a69 into TeamNewPipe:refactor Jul 3, 2024
6 checks passed
@Isira-Seneviratne Isira-Seneviratne deleted the Coil branch July 3, 2024 13:23
@Isira-Seneviratne Isira-Seneviratne restored the Coil branch July 5, 2024 02:57
Isira-Seneviratne added a commit that referenced this pull request Jul 5, 2024
Isira-Seneviratne added a commit to Isira-Seneviratne/NewPipe that referenced this pull request Jul 22, 2024
* Load notification icons using Coil

* Migrate to Coil from Picasso

* Clean up Picasso leftovers

* Enable RGB-565 for low-end devices

* Added Coil helper method

* Add annotation

* Simplify newImageLoader implementation

* Use Coil's default disk and memory cache config

* Enable crossfade animation

* Correct method name

* Fix thumbnail not being displayed in media notification
Isira-Seneviratne added a commit to Isira-Seneviratne/NewPipe that referenced this pull request Jul 22, 2024
* Load notification icons using Coil

* Migrate to Coil from Picasso

* Clean up Picasso leftovers

* Enable RGB-565 for low-end devices

* Added Coil helper method

* Add annotation

* Simplify newImageLoader implementation

* Use Coil's default disk and memory cache config

* Enable crossfade animation

* Correct method name

* Fix thumbnail not being displayed in media notification
Isira-Seneviratne added a commit to Isira-Seneviratne/NewPipe that referenced this pull request Jul 22, 2024
* Load notification icons using Coil

* Migrate to Coil from Picasso

* Clean up Picasso leftovers

* Enable RGB-565 for low-end devices

* Added Coil helper method

* Add annotation

* Simplify newImageLoader implementation

* Use Coil's default disk and memory cache config

* Enable crossfade animation

* Correct method name

* Fix thumbnail not being displayed in media notification
@ShareASmile ShareASmile added the rewrite Issues and PRs related to rewrite label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Issues and PRs related to dependencies rewrite Issues and PRs related to rewrite size/giant PRs with more than 750 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants