mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Drop GlideWebp
The benefit of rendering some corner-case webp images is negligible compared to issues related to the slow update policy of the library, such as recently in relevance to CVE-2023-4863 (but also previously for updating glide versions). Fixes https://github.com/SchildiChat/SchildiChat-android/issues/210 Change-Id: I3809e2b48e595809fed1a6f4e405cdf178126cdb
This commit is contained in:
parent
bf6f71c2b5
commit
29c921eb96
4 changed files with 2 additions and 9 deletions
|
@ -147,7 +147,6 @@ ext.libs = [
|
||||||
'glideImageLoader' : "com.github.piasy:GlideImageLoader:$bigImageViewer",
|
'glideImageLoader' : "com.github.piasy:GlideImageLoader:$bigImageViewer",
|
||||||
'progressPieIndicator' : "com.github.piasy:ProgressPieIndicator:$bigImageViewer",
|
'progressPieIndicator' : "com.github.piasy:ProgressPieIndicator:$bigImageViewer",
|
||||||
'glideImageViewFactory' : "com.github.piasy:GlideImageViewFactory:$bigImageViewer",
|
'glideImageViewFactory' : "com.github.piasy:GlideImageViewFactory:$bigImageViewer",
|
||||||
'glideWebpDecoder' : "com.github.zjupure:webpdecoder:2.3.$glide",
|
|
||||||
'flowBinding' : "io.github.reactivecircus.flowbinding:flowbinding-android:$flowBinding",
|
'flowBinding' : "io.github.reactivecircus.flowbinding:flowbinding-android:$flowBinding",
|
||||||
'flowBindingAppcompat' : "io.github.reactivecircus.flowbinding:flowbinding-appcompat:$flowBinding",
|
'flowBindingAppcompat' : "io.github.reactivecircus.flowbinding:flowbinding-appcompat:$flowBinding",
|
||||||
'flowBindingMaterial' : "io.github.reactivecircus.flowbinding:flowbinding-material:$flowBinding"
|
'flowBindingMaterial' : "io.github.reactivecircus.flowbinding:flowbinding-material:$flowBinding"
|
||||||
|
|
|
@ -88,7 +88,6 @@ ext.groups = [
|
||||||
'com.github.piasy',
|
'com.github.piasy',
|
||||||
'com.github.shyiko.klob',
|
'com.github.shyiko.klob',
|
||||||
'com.github.rubensousa',
|
'com.github.rubensousa',
|
||||||
'com.github.zjupure',
|
|
||||||
'com.google',
|
'com.google',
|
||||||
'com.google.android',
|
'com.google.android',
|
||||||
'com.google.api.grpc',
|
'com.google.api.grpc',
|
||||||
|
|
|
@ -218,7 +218,6 @@ dependencies {
|
||||||
implementation libs.github.bigImageViewer
|
implementation libs.github.bigImageViewer
|
||||||
implementation libs.github.glideImageLoader
|
implementation libs.github.glideImageLoader
|
||||||
implementation libs.github.glideImageViewFactory
|
implementation libs.github.glideImageViewFactory
|
||||||
implementation libs.github.glideWebpDecoder
|
|
||||||
|
|
||||||
// implementation 'com.github.MikeOrtiz:TouchImageView:3.0.2'
|
// implementation 'com.github.MikeOrtiz:TouchImageView:3.0.2'
|
||||||
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||||
|
|
|
@ -24,14 +24,13 @@ import android.widget.ImageView
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
import com.bumptech.glide.integration.webp.decoder.WebpDrawable
|
|
||||||
import com.bumptech.glide.integration.webp.decoder.WebpDrawableTransformation
|
|
||||||
import com.bumptech.glide.load.DataSource
|
import com.bumptech.glide.load.DataSource
|
||||||
import com.bumptech.glide.load.Transformation
|
import com.bumptech.glide.load.Transformation
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.load.engine.GlideException
|
import com.bumptech.glide.load.engine.GlideException
|
||||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
|
import com.bumptech.glide.request.RequestOptions
|
||||||
import com.bumptech.glide.request.target.CustomViewTarget
|
import com.bumptech.glide.request.target.CustomViewTarget
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
|
@ -183,10 +182,7 @@ class ImageContentRenderer @Inject constructor(
|
||||||
})
|
})
|
||||||
request = if (animate && mode == Mode.ANIMATED_THUMBNAIL) {
|
request = if (animate && mode == Mode.ANIMATED_THUMBNAIL) {
|
||||||
// Glide seems to already do some dp to px calculation for animated gifs?
|
// Glide seems to already do some dp to px calculation for animated gifs?
|
||||||
val animatedCornerTransformation = RoundedCorners(cornerRoundnessDp)
|
request.optionalTransform(RoundedCorners(cornerRoundnessDp))
|
||||||
request.optionalTransform(animatedCornerTransformation)
|
|
||||||
.transform(WebpDrawable::class.java, WebpDrawableTransformation(animatedCornerTransformation))
|
|
||||||
//request.apply(RequestOptions.bitmapTransform(RoundedCorners(3)))
|
|
||||||
} else {
|
} else {
|
||||||
request.dontAnimate()
|
request.dontAnimate()
|
||||||
.optionalTransform(cornerTransformation)
|
.optionalTransform(cornerTransformation)
|
||||||
|
|
Loading…
Reference in a new issue