[Player] Fixed Show now playing not working

This commit is contained in:
Prathamesh More 2021-12-03 19:53:43 +05:30
parent 93277b8de7
commit ba9c928588
5 changed files with 48 additions and 22 deletions

View file

@ -1,7 +1,9 @@
package code.name.monkey.retromusic.extensions
import androidx.core.view.WindowInsetsCompat
import code.name.monkey.retromusic.util.RetroUtil
fun WindowInsetsCompat?.safeGetBottomInsets(): Int {
return this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: 0
// Get Navbar heights if insets are null
return (this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: RetroUtil.getNavigationBarHeight())
}

View file

@ -69,6 +69,7 @@ fun View.translateYAnimate(value: Float): Animator {
duration = 300
doOnStart {
show()
bringToFront()
}
doOnEnd {
if (value != 0f) {