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 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; });