Fix crash in comment screen after leaving the app

This commit is contained in:
FooIbar committed 2024-01-01 17:36:53 +08:00
1 parent 3043901b5a
commit 4a12e71877
1 file changed
+2 -1
@@ -177,7 +177,8 @@ class EhApplication : Application(), SingletonImageLoader.Factory {
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
if (level >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW) {
galleryDetailCache.evictAll()
// Keep one entry for GalleryCommentsScreen
galleryDetailCache.trimToSize(1)
}
}