From 08023a104c8f0a5d0afc65827de0f5dc94a575e6 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 27 May 2023 09:54:58 -0300 Subject: [PATCH] fix: fix wrong window insets on instance rules and block list fragment --- .../android/fragments/InstanceBlockListFragment.java | 2 +- .../android/fragments/onboarding/InstanceRulesFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceBlockListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceBlockListFragment.java index 4aa6fa1d1..46e0504ac 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceBlockListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceBlockListFragment.java @@ -121,7 +121,7 @@ public class InstanceBlockListFragment extends LoaderFragment { if(Build.VERSION.SDK_INT>=27){ int inset=insets.getSystemWindowInsetBottom(); buttonBar.setPadding(0, 0, 0, inset>0 ? Math.max(inset, V.dp(36)) : 0); - super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0)); + super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom())); }else{ super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom())); } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/InstanceRulesFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/InstanceRulesFragment.java index 5eb4a55ca..aa748cbc2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/InstanceRulesFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/InstanceRulesFragment.java @@ -124,7 +124,7 @@ public class InstanceRulesFragment extends ToolbarFragment{ if(Build.VERSION.SDK_INT>=27){ int inset=insets.getSystemWindowInsetBottom(); buttonBar.setPadding(0, 0, 0, inset>0 ? Math.max(inset, V.dp(36)) : 0); - super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0)); + super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom())); }else{ super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom())); }