Skip to content

Commit

Permalink
fix: attachment options in chat not working on android 14 (WPB-1846) (#…
Browse files Browse the repository at this point in the history
…2078)

Co-authored-by: Oussama Hassine <[email protected]>
Co-authored-by: Mateusz <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2023
1 parent 3b7900e commit cbd5ae1
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.isImeVisible
import androidx.compose.foundation.layout.navigationBarsIgnoringVisibility
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
Expand All @@ -18,12 +17,7 @@ import androidx.core.view.WindowInsetsCompat
object KeyboardHelper {

@Composable
fun isKeyboardVisible(): Boolean =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
WindowInsets.isImeVisible
} else {
ViewCompat.getRootWindowInsets(LocalView.current)?.isVisible(WindowInsetsCompat.Type.ime()) ?: false
}
fun isKeyboardVisible(): Boolean = ViewCompat.getRootWindowInsets(LocalView.current)?.isVisible(WindowInsetsCompat.Type.ime()) ?: false

@Composable
fun getCalculatedKeyboardHeight(): Dp =
Expand Down

0 comments on commit cbd5ae1

Please sign in to comment.