Skip to content

Commit

Permalink
Crash fixes (#82)
Browse files Browse the repository at this point in the history
* Allow null bucketDisplayName

* Check that current cursor is not null
  • Loading branch information
kinnerapriyap authored Nov 20, 2020
1 parent e71fefd commit 2efe420
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MediaGalleryFragment : Fragment(), MediaCellListener {
Observer {
it ?: return@Observer
mediaGalleryAdapter = MediaGalleryAdapter(
viewModel.getCurrentMediaCursor(),
viewModel.getCurrentMediaCursor() ?: return@Observer,
viewModel.getSelectedMediaCellDisplayModels(),
this@MediaGalleryFragment,
viewModel.getChoiceSpec().mimeTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ data class MediaCellDisplayModel(
val mediaUri: Uri,
val isChecked: Boolean = false,
val isEnabled: Boolean,
val bucketDisplayName: String,
val bucketDisplayName: String?,
val mimeType: MimeType?
) : Parcelable

0 comments on commit 2efe420

Please sign in to comment.