From dd81817e66f1418720d5c7099184410bf6f55409 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Fri, 11 Aug 2023 16:16:55 +0200 Subject: [PATCH] Glimpse: Increase memory cache size It's now 5% bigger Change-Id: Ic1b1d87f0e2adff64fc354ff6207e96243657c5a --- app/src/main/java/org/lineageos/glimpse/GlimpseApplication.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/lineageos/glimpse/GlimpseApplication.kt b/app/src/main/java/org/lineageos/glimpse/GlimpseApplication.kt index c488607..c645388 100644 --- a/app/src/main/java/org/lineageos/glimpse/GlimpseApplication.kt +++ b/app/src/main/java/org/lineageos/glimpse/GlimpseApplication.kt @@ -12,6 +12,7 @@ import coil.ImageLoaderFactory import coil.decode.GifDecoder import coil.decode.ImageDecoderDecoder import coil.decode.VideoFrameDecoder +import coil.memory.MemoryCache import com.google.android.material.color.DynamicColors import org.lineageos.glimpse.repository.MediaRepository @@ -31,5 +32,7 @@ class GlimpseApplication : Application(), ImageLoaderFactory { } add(GifDecoder.Factory()) add(VideoFrameDecoder.Factory()) + }.memoryCache { + MemoryCache.Builder(this).maxSizePercent(0.25).build() }.build() }