mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
fix: use correct fragment manager for result callbacks
This commit is contained in:
parent
dc6563800f
commit
07d925bda0
@ -170,7 +170,7 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
requireActivity().supportFragmentManager.setFragmentResultListener(
|
childFragmentManager.setFragmentResultListener(
|
||||||
ChaptersBottomSheet.SEEK_TO_POSITION_REQUEST_KEY,
|
ChaptersBottomSheet.SEEK_TO_POSITION_REQUEST_KEY,
|
||||||
viewLifecycleOwner
|
viewLifecycleOwner
|
||||||
) { _, bundle ->
|
) { _, bundle ->
|
||||||
@ -187,7 +187,7 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
|||||||
IntentData.duration to playerService.player?.duration?.div(1000)
|
IntentData.duration to playerService.player?.duration?.div(1000)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.show(requireActivity().supportFragmentManager)
|
.show(childFragmentManager)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.miniPlayerClose.setOnClickListener {
|
binding.miniPlayerClose.setOnClickListener {
|
||||||
|
@ -231,19 +231,14 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment() {
|
|||||||
|
|
||||||
private fun setupSortAndFilter() {
|
private fun setupSortAndFilter() {
|
||||||
binding.filterSort.setOnClickListener {
|
binding.filterSort.setOnClickListener {
|
||||||
val activityCompat = context as AppCompatActivity
|
childFragmentManager.setFragmentResultListener(
|
||||||
val fragManager = activityCompat
|
FILTER_SORT_REQUEST_KEY,
|
||||||
.supportFragmentManager
|
viewLifecycleOwner
|
||||||
.apply {
|
) { _, resultBundle ->
|
||||||
setFragmentResultListener(
|
selectedSortOrder = resultBundle.getInt(IntentData.sortOptions)
|
||||||
FILTER_SORT_REQUEST_KEY,
|
hideWatched = resultBundle.getBoolean(IntentData.hideWatched)
|
||||||
activityCompat
|
showFeed()
|
||||||
) { _, resultBundle ->
|
}
|
||||||
selectedSortOrder = resultBundle.getInt(IntentData.sortOptions)
|
|
||||||
hideWatched = resultBundle.getBoolean(IntentData.hideWatched)
|
|
||||||
showFeed()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterSortBottomSheet()
|
FilterSortBottomSheet()
|
||||||
.apply {
|
.apply {
|
||||||
@ -252,7 +247,7 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment() {
|
|||||||
IntentData.hideWatched to hideWatched
|
IntentData.hideWatched to hideWatched
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.show(fragManager)
|
.show(childFragmentManager)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user