Skip to content

Commit fe24947

Browse files
committed
Fix unsafe observe calls
1 parent c5040f1 commit fe24947

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/me/proxer/app/media/list/MediaListSearchBottomSheet.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MediaListSearchBottomSheet private constructor(
9393

9494
viewModel.loadTags()
9595

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

@@ -105,7 +105,7 @@ class MediaListSearchBottomSheet private constructor(
105105
}
106106
})
107107

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

0 commit comments

Comments
 (0)