Skip to content

Commit

Permalink
Remove gif preview to use it only in the good project
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBourdin88 committed Jun 19, 2024
1 parent c80a9ee commit 0160f25
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ dependencies {
api 'com.google.code.gson:gson:2.11.0'

def coilVersion = '2.6.0'
api "io.coil-kt:coil-gif:$coilVersion"
api "io.coil-kt:coil:$coilVersion"

api 'com.github.infomaniak:android-login:2.8.0'
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/com/infomaniak/lib/core/utils/CoilUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
package com.infomaniak.lib.core.utils

import android.content.Context
import android.os.Build
import coil.ImageLoader
import coil.decode.Decoder
import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
import coil.disk.DiskCache
import coil.memory.MemoryCache
import com.infomaniak.lib.core.auth.TokenAuthenticator
Expand Down Expand Up @@ -54,20 +51,11 @@ object CoilUtils {
fun newImageLoader(
context: Context,
tokenInterceptorListener: TokenInterceptorListener? = null,
gifPreview: Boolean = false,
customFactories: List<Decoder.Factory> = emptyList()
): ImageLoader {
return ImageLoader.Builder(context)
.crossfade(true)
.components {
if (gifPreview) {
val factory = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
ImageDecoderDecoder.Factory()
} else {
GifDecoder.Factory()
}
add(factory)
}
customFactories.forEach { add(it) }
}
.okHttpClient {
Expand Down

0 comments on commit 0160f25

Please sign in to comment.