summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-09 10:32:48 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-09 10:32:48 +0530
commite8c9c2057048eeccb8e3d1c7f0bb3c6df76e9c21 (patch)
tree93b41f5a7cdcb16694fac6abc573fd53973622cd /app/src
parent0db2578ca022205309f75f9afe8d3ce97f4b8308 (diff)
MainActivity: Dispatch insets to all fragments
Fixes tunnel list fragment rendering behind statusbar when other fragments are showing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/activity/MainActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/activity/MainActivity.java b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
index 5c9084d0..4c33f000 100644
--- a/app/src/main/java/com/wireguard/android/activity/MainActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
@@ -79,7 +79,9 @@ public class MainActivity extends BaseActivity
final FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.addOnBackStackChangedListener(() -> {
final List<Fragment> fragments = fragmentManager.getFragments();
- fragments.get(fragments.size() - 1).requireView().dispatchApplyWindowInsets(insets);
+ for (int i = 0; i < fragments.size(); i++) {
+ fragments.get(i).requireView().dispatchApplyWindowInsets(insets);
+ }
});
return insets;
});