-
Notifications
You must be signed in to change notification settings - Fork 167
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
Added blur for Android version older than 12 #746
Added blur for Android version older than 12 #746
Conversation
…rsions < Android 12. Android 12 and above still uses the compose .blur function, older Android versions blur the images with a BlurTransformation provided by T8RIN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing you accidentally added a lot more than was necessary for some reason, or github messed up somehow, due to all the conflicts. You might need to start from scratch from main, and copy your new file over.
Ugh honestly I'm 99 % sure i made a stupid decision moving and renaming your I will revert this refactoring and update the PR accordingly this evening. |
Sounds good, thx! There's no rush on it, I usually do frequent releases, so this will get in at some point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…kwards_compatible
…nklaus/jerboa into 733_make_blur_backwards_compatible
Closes #733
I added a check for the Android version in
app/src/main/java/com/jerboa/ui/components/common/PictrsImage.kt
Android version 12 or newer still uses the Jetpack Compose function
.blur()
.For older versions I added a BlurTransformation provided by https://github.com/T8RIN/BlurTransformation that is applied to the Coil ImageRequest.
Because I added a new utility class to the project i created a new package
com.jerboa.util
and moved the existing classUtil.kt
to this package. This lead to a lot of refactoring to meet the lint requirements. Hence the many changes.The real changes are in:
app/src/main/java/com/jerboa/ui/components/common/PictrsImage.kt
and
app/src/main/java/com/jerboa/util/BlurTransformation.kt