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

Prevent crash with AudioBrowserFragment empty view update

parent 639dba3f
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,7 @@ class AudioBrowserFragment : BaseAudioBrowser<AudioBrowserViewModel>() {
override fun enableSearchOption() = true
private fun updateEmptyView() {
if (!isAdded) return
swipeRefreshLayout.visibility = if (Medialibrary.getInstance().isInitiated) View.VISIBLE else View.GONE
emptyView.emptyText = viewModel.filterQuery?.let { getString(R.string.empty_search, it) } ?: if (viewModel.providers[currentTab].onlyFavorites) getString(R.string.nofav) else getString(R.string.nomedia)
emptyView.state = when {
......
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