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
…2073)

Co-authored-by: Mateusz <m.pachulski94@gmail.com>
  • Loading branch information
ohassine and trOnk12 committed Aug 9, 2023
1 parent 6bef4bb commit 7047286
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 7047286

Please sign in to comment.