Skip to content

Commit

Permalink
Fix unsafe observe calls
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Oct 26, 2019
1 parent c5040f1 commit fe24947
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class MediaListSearchBottomSheet private constructor(

viewModel.loadTags()

viewModel.genreData.observe(fragment, Observer {
viewModel.genreData.observe(fragment.viewLifecycleOwner, Observer {
if (it != null) {
val items = it.map { tag -> ExpandableSelectionView.Item(tag.name, tag.description) }

Expand All @@ -105,7 +105,7 @@ class MediaListSearchBottomSheet private constructor(
}
})

viewModel.tagData.observe(fragment, Observer {
viewModel.tagData.observe(fragment.viewLifecycleOwner, Observer {
if (it != null) {
val items = it.map { tag -> ExpandableSelectionView.Item(tag.name, tag.description) }

Expand Down

0 comments on commit fe24947

Please sign in to comment.