Glimpse: Increase memory cache size

It's now 5% bigger

Change-Id: Ic1b1d87f0e2adff64fc354ff6207e96243657c5a
This commit is contained in:
Luca Stefani 2023-08-11 16:16:55 +02:00 committed by Sebastiano Barezzi
parent a528b7302b
commit dd81817e66
No known key found for this signature in database
GPG Key ID: 763BD3AE91A7A13F
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import coil.ImageLoaderFactory
import coil.decode.GifDecoder import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder import coil.decode.ImageDecoderDecoder
import coil.decode.VideoFrameDecoder import coil.decode.VideoFrameDecoder
import coil.memory.MemoryCache
import com.google.android.material.color.DynamicColors import com.google.android.material.color.DynamicColors
import org.lineageos.glimpse.repository.MediaRepository import org.lineageos.glimpse.repository.MediaRepository
@ -31,5 +32,7 @@ class GlimpseApplication : Application(), ImageLoaderFactory {
} }
add(GifDecoder.Factory()) add(GifDecoder.Factory())
add(VideoFrameDecoder.Factory()) add(VideoFrameDecoder.Factory())
}.memoryCache {
MemoryCache.Builder(this).maxSizePercent(0.25).build()
}.build() }.build()
} }