[Android] Fix MoreFragment leaks
Nicolas Pomepuy
git at videolan.org
Thu Sep 7 08:21:02 UTC 2023
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 25 13:59:04 2023 +0200| [445b9c8bc389edf4cb3147c32660c9c2c0a5b3fa] | committer: Nicolas Pomepuy
Fix MoreFragment leaks
> https://code.videolan.org/videolan/vlc-android/commit/445b9c8bc389edf4cb3147c32660c9c2c0a5b3fa
---
application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
index cd715ed69c..4738465e70 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
@@ -136,12 +136,12 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
i.putExtra("fragment", SecondaryActivity.STREAMS)
requireActivity().startActivityForResult(i, SecondaryActivity.ACTIVITY_RESULT_SECONDARY)
}
- streamsViewModel.dataset.observe(requireActivity()) {
+ streamsViewModel.dataset.observe(viewLifecycleOwner) {
streamsAdapter.update(it)
streamsEntry.loading.state = EmptyLoadingState.NONE
}
- streamsViewModel.loading.observe(requireActivity()) {
+ streamsViewModel.loading.observe(viewLifecycleOwner) {
lifecycleScope.launchWhenStarted {
if (it) delay(300L)
(activity as? MainActivity)?.refreshing = it
More information about the Android
mailing list