fast4x / RiMusic

A multilingual Android application for streaming music from YouTube Music.
https://rimusic.xyz
GNU General Public License v3.0
2.55k stars 131 forks source link

Issue with Gradient Cover and dynamic color palette #4577

Closed Abhinavreddy-B closed 2 days ago

Abhinavreddy-B commented 3 days ago

This PR solves the following issues:

4540

4544

4554

4550

There were 2 point of problems in previous code:

  1. in MainActivity, the colorPalette of the whole app is being updated even if the theme was not dynamic. https://github.com/fast4x/RiMusic/blob/4567701c3e4669075a6cdf0f1a966f628cfd61a9/composeApp/src/androidMain/kotlin/it/fast4x/rimusic/MainActivity.kt#L566C1-L569C1

  2. In Player, the bitmap from binder.bitmap is not the correct bitmap of the image, though I am not sure what bitmap it was returning, I am sure that it is not the correct one because the hsl of dominantSwatch is coming out to be null. https://github.com/fast4x/RiMusic/blob/4567701c3e4669075a6cdf0f1a966f628cfd61a9/composeApp/src/androidMain/kotlin/it/fast4x/rimusic/ui/screens/player/Player.kt#L735C1-L742C1

fast4x commented 2 days ago

Woooowwwww 😂

Abhinavreddy-B commented 1 day ago

It works fine from my local machine, when I run through ADB. But when I generate an APK and test it, it doesn't work. can you please check if I am doing anything wrong here?

fast4x commented 1 day ago

ok