Skip to content

Commit

Permalink
Remove deprecated systemWindowInsetBottom usage. (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech authored May 4, 2022
1 parent efcccf8 commit 95b0155
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion emoji/src/main/kotlin/com/vanniktech/emoji/EmojiPopup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,12 @@ class EmojiPopup internal constructor(
val popup = emojiPopup.get()

if (popup != null) {
val systemWindowInsetBottom = insets.systemWindowInsetBottom
val systemWindowInsetBottom = if (VERSION.SDK_INT >= VERSION_CODES.R) {
insets.getInsets(WindowInsets.Type.ime()).bottom
} else {
@Suppress("DEPRECATION")
insets.systemWindowInsetBottom
}

val stableInsetBottom = if (VERSION.SDK_INT >= VERSION_CODES.R) {
insets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars()).bottom
Expand Down

0 comments on commit 95b0155

Please sign in to comment.