Support opening unknown attachment types via openLink (#2044)

* Support opening unknown attachment types via openLink. #1970

* Fix label text for unknown attachment types
This commit is contained in:
Levi Bard 2021-01-18 13:53:13 +01:00 committed by GitHub
commit baa915a0a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 16 deletions

View file

@ -228,7 +228,8 @@ class StatusViewHelper(private val itemView: View) {
return when (type) {
Attachment.Type.IMAGE -> context.getString(R.string.status_media_images)
Attachment.Type.GIFV, Attachment.Type.VIDEO -> context.getString(R.string.status_media_video)
else -> context.getString(R.string.status_media_images)
Attachment.Type.AUDIO -> context.getString(R.string.status_media_audio)
else -> context.getString(R.string.status_media_attachments)
}
}
@ -237,7 +238,8 @@ class StatusViewHelper(private val itemView: View) {
return when (type) {
Attachment.Type.IMAGE -> R.drawable.ic_photo_24dp
Attachment.Type.GIFV, Attachment.Type.VIDEO -> R.drawable.ic_videocam_24dp
else -> R.drawable.ic_photo_24dp
Attachment.Type.AUDIO -> R.drawable.ic_music_box_24dp
else -> R.drawable.ic_attach_file_24dp
}
}