@@ -6,14 +6,14 @@ import android.view.LayoutInflater
66import android.view.ViewGroup
77import android.webkit.WebView
88import androidx.compose.foundation.layout.WindowInsets
9+ import androidx.compose.foundation.layout.asPaddingValues
910import androidx.compose.foundation.layout.fillMaxSize
1011import androidx.compose.foundation.layout.ime
1112import androidx.compose.foundation.layout.padding
1213import androidx.compose.runtime.collectAsState
1314import androidx.compose.runtime.getValue
1415import androidx.compose.ui.Modifier
1516import androidx.compose.ui.platform.LocalContext
16- import androidx.compose.ui.platform.LocalDensity
1717import androidx.compose.ui.unit.dp
1818import androidx.fragment.compose.content
1919import au.com.shiftyjelly.pocketcasts.compose.AppThemeWithBackground
@@ -42,9 +42,7 @@ class HelpFragment : BaseFragment(), HasBackstack {
4242 ) = content {
4343 AppThemeWithBackground (theme.activeTheme) {
4444 val context = LocalContext .current
45- val density = LocalDensity .current
46- val imeInsets = WindowInsets .ime
47- val keyboardHeight = with (density) { imeInsets.getBottom(density).toDp() }
45+ val keyboardHeight = WindowInsets .ime.asPaddingValues().calculateBottomPadding()
4846
4947 val bottomPadding by settings.bottomInset.collectAsState(0 )
5048 val miniPlayerPadding = bottomPadding.pxToDp(context).dp
0 commit comments