diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt index 3a3d3f4ee..983ea00a2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt @@ -18,7 +18,7 @@ import java.util.* class PortraitPhotosAdapter(val context: Context, val photos: ArrayList, val sideElementWidth: Int, val itemClick: (Int) -> Unit) : RecyclerView.Adapter() { - private var currentSelection = photos.first() + private var currentSelection = photos.firstOrNull { it.contains("cover", true) } ?: photos.firstOrNull { it.isNotEmpty() } private var strokeBackground = context.resources.getDrawable(R.drawable.stroke_background) private val itemWidth = context.resources.getDimension(R.dimen.portrait_photos_stripe_height).toInt()