Fixed bottom sheet peek height

This commit is contained in:
Prathamesh More 2021-12-24 22:47:32 +05:30
parent e67c094320
commit be917106a6

View file

@ -2,11 +2,12 @@ package code.name.monkey.retromusic.extensions
import androidx.core.view.WindowInsetsCompat
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroUtil
fun WindowInsetsCompat?.safeGetBottomInsets(): Int {
return if (PreferenceUtil.isFullScreenMode) {
return 0
} else {
this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: 0
this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: RetroUtil.getNavigationBarHeight()
}
}