[Android] Fix the issue preventing a group to be opened
Nicolas Pomepuy
git at videolan.org
Thu Mar 3 12:56:19 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Mar 1 13:59:01 2022 +0100| [a643adf6a9728cffbc7fe9e36b98763a83b57703] | committer: Nicolas Pomepuy
Fix the issue preventing a group to be opened
> https://code.videolan.org/videolan/vlc-android/commit/a643adf6a9728cffbc7fe9e36b98763a83b57703
---
.../vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index f5a9329c2..e678329d5 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -31,6 +31,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
+import androidx.paging.InitialPagedList
import androidx.paging.PagedList
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@@ -73,7 +74,6 @@ import org.videolan.vlc.util.share
import org.videolan.vlc.viewmodels.mobile.VideoGroupingType
import org.videolan.vlc.viewmodels.mobile.VideosViewModel
import org.videolan.vlc.viewmodels.mobile.getViewModel
-import java.util.*
private const val TAG = "VLC/VideoListFragment"
@@ -140,7 +140,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
(it as? PagedList<MediaLibraryItem>)?.let { videoListAdapter.submitList(it) }
updateEmptyView()
restoreMultiSelectHelper()
- if (activity?.isFinishing == false && viewModel.group != null && it.size < 2) requireActivity().finish()
+ if (it !is InitialPagedList<*, *> && activity?.isFinishing == false && viewModel.group != null && it.size < 2) requireActivity().finish()
setFabPlayVisibility(true)
}
}
More information about the Android
mailing list