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 d030a59..dd6dd35 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/AlbumThumbnailAdapter.kt @@ -15,6 +15,7 @@ import androidx.navigation.NavController import androidx.recyclerview.widget.RecyclerView import coil.load import org.lineageos.glimpse.R +import org.lineageos.glimpse.ext.* import org.lineageos.glimpse.fragments.AlbumFragment import org.lineageos.glimpse.models.Album @@ -75,6 +76,7 @@ class AlbumThumbnailAdapter( ) thumbnailImageView.load(album.thumbnail) { + size(ThumbnailLayoutManager.MAX_THUMBNAIL_SIZE.px) placeholder(R.drawable.thumbnail_placeholder) } 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 7e551b7..27ea9c1 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailAdapter.kt @@ -17,6 +17,7 @@ import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import coil.load import org.lineageos.glimpse.R +import org.lineageos.glimpse.ext.* import org.lineageos.glimpse.models.Media import org.lineageos.glimpse.models.MediaType import java.time.ZoneId @@ -192,6 +193,7 @@ class ThumbnailAdapter( this.position = position thumbnailImageView.load(media.externalContentUri) { + size(ThumbnailLayoutManager.MAX_THUMBNAIL_SIZE.px) placeholder(R.drawable.thumbnail_placeholder) } videoOverlayImageView.isVisible = media.mediaType == MediaType.VIDEO diff --git a/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailLayoutManager.kt b/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailLayoutManager.kt index c82e6a6..ad3772f 100644 --- a/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailLayoutManager.kt +++ b/app/src/main/java/org/lineageos/glimpse/thumbnail/ThumbnailLayoutManager.kt @@ -43,7 +43,7 @@ class ThumbnailLayoutManager( /** * Maximum thumbnail size, useful for high density screens. */ - private const val MAX_THUMBNAIL_SIZE = 128 + const val MAX_THUMBNAIL_SIZE = 128 private enum class Orientation { VERTICAL,