[UI] Fixed last playlist song hidden by mini player

main
Prathamesh More 2021-12-01 14:02:50 +05:30
parent 238c54c6fb
commit 12cf446375
1 changed files with 8 additions and 3 deletions

View File

@ -18,9 +18,10 @@ import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
import code.name.monkey.retromusic.databinding.FragmentPlaylistDetailBinding
import code.name.monkey.retromusic.db.PlaylistWithSongs
import code.name.monkey.retromusic.db.toSongs
import code.name.monkey.retromusic.extensions.dipToPix
import code.name.monkey.retromusic.extensions.dip
import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
@ -123,8 +124,12 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli
}
private fun checkForPadding() {
val height = dipToPix(52f)
binding.recyclerView.setPadding(0, 0, 0, height.toInt())
val itemCount: Int = playlistSongAdapter.itemCount
if (itemCount > 0 && MusicPlayerRemote.playingQueue.isNotEmpty()) {
binding.recyclerView.updatePadding(bottom = dip(R.dimen.mini_player_height))
} else {
binding.recyclerView.updatePadding(bottom = 0)
}
}
private fun checkIsEmpty() {