diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/SystemWindowInsetsSetter.kt b/app/src/main/java/org/thoughtcrime/securesms/util/SystemWindowInsetsSetter.kt index 1d0df27b3..b17d464cd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/SystemWindowInsetsSetter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/SystemWindowInsetsSetter.kt @@ -25,11 +25,23 @@ object SystemWindowInsetsSetter { insets.bottom ) } else { + val top = if (insetType and WindowInsetsCompat.Type.statusBars() != 0) { + ViewUtil.getStatusBarHeight(view) + } else { + 0 + } + + val bottom = if (insetType and WindowInsetsCompat.Type.navigationBars() != 0) { + ViewUtil.getNavigationBarHeight(view) + } else { + 0 + } + view.setPadding( 0, - ViewUtil.getStatusBarHeight(view), + top, 0, - ViewUtil.getNavigationBarHeight(view) + bottom ) } }