Commit dfab2429 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix NoSuchElementException

parent 215f9acf
Pipeline #48054 passed with stage
in 3 minutes and 21 seconds
......@@ -337,7 +337,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
}
private fun checkFolderToParent(count: Int) = if (count == 1)
(multiSelectHelper.getSelection().first() as? MediaWrapper)?.let {
(multiSelectHelper.getSelection().firstOrNull() as? MediaWrapper)?.let {
if (it.type != MediaWrapper.TYPE_VIDEO) false
it.uri.retrieveParent() != null
} ?: false else false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment