Fixed Storages not loading in FoldersFragment

This commit is contained in:
Prathamesh More 2021-10-26 16:28:56 +05:30
parent 34c2f6e3d3
commit cde2e0b229
3 changed files with 3 additions and 5 deletions

View file

@ -164,12 +164,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() {
fun collapsePanel() {
bottomSheetBehavior.state = STATE_COLLAPSED
setMiniPlayerAlphaProgress(0f)
}
fun expandPanel() {
bottomSheetBehavior.state = STATE_EXPANDED
setMiniPlayerAlphaProgress(1f)
}
private fun setMiniPlayerAlphaProgress(progress: Float) {

View file

@ -94,7 +94,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
return@Comparator lhs.name.compareTo(rhs.name, ignoreCase = true)
}
}
private val storageItems = ArrayList<Storage>()
private var storageItems = ArrayList<Storage>()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
@ -765,7 +765,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
}
private fun switchToStorageAdapter() {
FileUtil.listRoots()
storageItems = FileUtil.listRoots()
storageAdapter = StorageAdapter(storageItems, this)
binding.recyclerView.adapter = storageAdapter
binding.breadCrumbs.clearCrumbs()