show a Portrait icon when appropriate

This commit is contained in:
tibbi 2019-10-01 21:47:43 +02:00
parent 45e604dae4
commit 138f563534
1 changed files with 6 additions and 1 deletions

View File

@ -457,7 +457,12 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
private fun setupThumbnail(view: View, medium: Medium) { private fun setupThumbnail(view: View, medium: Medium) {
val isSelected = selectedKeys.contains(medium.path.hashCode()) val isSelected = selectedKeys.contains(medium.path.hashCode())
view.apply { view.apply {
play_outline.beVisibleIf(medium.isVideo()) play_outline.beVisibleIf(medium.isVideo() || medium.isPortrait())
if (medium.isVideo()) {
play_outline.setImageResource(R.drawable.img_play_outline)
} else if (medium.isPortrait()) {
play_outline.setImageResource(R.drawable.ic_portrait_photo_vector)
}
if (showFileTypes && (medium.isGIF() || medium.isRaw() || medium.isSVG())) { if (showFileTypes && (medium.isGIF() || medium.isRaw() || medium.isSVG())) {
file_type.setText(when (medium.type) { file_type.setText(when (medium.type) {