Skip to content

Commit

Permalink
Changed memory caching of images to be max 50MB instead of 25% of RAM
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Kalderstam <[email protected]>
  • Loading branch information
spacecowboy committed Jan 4, 2025
1 parent 5faffc8 commit 72d8737
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
import coil.decode.SvgDecoder
import coil.disk.DiskCache
import coil.memory.MemoryCache
import com.danielrampelt.coil.ico.IcoDecoder
import com.nononsenseapps.feeder.archmodel.Repository
import com.nononsenseapps.feeder.db.room.AppDatabase
Expand Down Expand Up @@ -167,6 +168,11 @@ class FeederApplication : Application(), DIAware, ImageLoaderFactory {
.maxSizeBytes(250L * 1024 * 1024)
.build(),
)
.memoryCache {
MemoryCache.Builder(this@FeederApplication)
.maxSizeBytes(50 * 1024 * 1024)
.build()
}
.components {
add(TooLargeImageInterceptor())
add(SvgDecoder.Factory())
Expand Down

0 comments on commit 72d8737

Please sign in to comment.