diff --git a/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt b/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt index ab1f1a2..0781cf0 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt @@ -71,6 +71,7 @@ class AlbumThumbnailAdapter( ) thumbnailImageView.load(album.thumbnail.externalContentUri) { + memoryCacheKey("thumbnail_${album.thumbnail.id}") size(ThumbnailLayoutManager.MAX_THUMBNAIL_SIZE.px) placeholder(R.drawable.thumbnail_placeholder) } diff --git a/app/src/main/java/org/lineageos/glimpse/thumbnail/MediaViewerAdapter.kt b/app/src/main/java/org/lineageos/glimpse/thumbnail/MediaViewerAdapter.kt index 6b02a5f..e462ccc 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/MediaViewerAdapter.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/MediaViewerAdapter.kt @@ -93,7 +93,9 @@ class MediaViewerAdapter( fun bind(media: Media, position: Int) { this.media = media this.position = position - imageView.load(media.externalContentUri) + imageView.load(media.externalContentUri) { + memoryCacheKey("full_${media.id}") + } } fun onViewAttachedToWindow() { diff --git a/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt b/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt index 5f98970..970052c 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt @@ -150,6 +150,7 @@ class ThumbnailAdapter( this.position = position thumbnailImageView.load(media.externalContentUri) { + memoryCacheKey("thumbnail_${media.id}") size(ThumbnailLayoutManager.MAX_THUMBNAIL_SIZE.px) placeholder(R.drawable.thumbnail_placeholder) }