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

Fix NullPointerException

parent 8b95d911
No related branches found
No related tags found
1 merge request!1068Beta fixes
Pipeline #126793 passed with stage
in 2 minutes and 39 seconds
......@@ -137,7 +137,7 @@ class MLStorageBrowserFragment : BaseFragment(), IStorageFragmentDelegate by Sto
networkViewModel = getBrowserModel(category = TYPE_NETWORK, url = null, showHiddenFiles = false)
networkViewModel.dataset.observe(viewLifecycleOwner, { list ->
list?.let {
val filtered = it.filter { item -> item is MediaWrapper && item.uri.scheme == "smb" }
val filtered = it.filter { item -> item is MediaWrapper && item.uri?.scheme == "smb" }
networkAdapter.update(filtered)
updateNetworkEmptyView(networkEntry.loading)
if (networkViewModel.loading.value == false) networkEntry.loading.state = if (list.isEmpty()) EmptyLoadingState.EMPTY else EmptyLoadingState.NONE
......
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