mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
properly determine the default portrait photos cover
This commit is contained in:
parent
29cd22bda7
commit
d70dd26ea6
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ import java.util.*
|
|||
class PortraitPhotosAdapter(val context: Context, val photos: ArrayList<String>, val sideElementWidth: Int, val itemClick: (Int) -> Unit) :
|
||||
RecyclerView.Adapter<PortraitPhotosAdapter.ViewHolder>() {
|
||||
|
||||
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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue