fix crash on unknown media type

main
Conny Duck 6 years ago
parent 401fdd7138
commit 8b3dbf54a1
  1. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/ViewMediaFragment.kt

@ -48,7 +48,7 @@ abstract class ViewMediaFragment : BaseFragment() {
Attachment.Type.IMAGE -> ViewImageFragment()
Attachment.Type.VIDEO,
Attachment.Type.GIFV -> ViewVideoFragment()
else -> throw Exception("Unknown media type: $attachment")
else -> ViewImageFragment() // it probably won't show anything, but its better than crashing
}
fragment.arguments = arguments
return fragment

Loading…
Cancel
Save