Skip to content
Snippets Groups Projects
Commit dfab2429 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix NoSuchElementException

parent 215f9acf
No related branches found
No related tags found
1 merge request!852Fix NoSuchElementException
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment