summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-08-07 01:25:39 +0200
committercyBerta <cyberta@riseup.net>2023-08-07 01:32:09 +0200
commitf9faf01dc0f847e51faafbe9b4b5082719cbf3cb (patch)
tree68064ffb29e7b3d513deea775ca3f9c7eb4bb6e1 /app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java
parent216183b69102dd808cce0c6d95d449c39157eeac (diff)
Fixes various bugs related to the re-creation of the SetupActivity and the loaded Fragments after an layout orientation change.
* fixes the initialization of fragments via a Bundle * saves state before the Activity/Fragments get destroyed and loads the old state on re-creation * fixes onFragmentSelected() callback handling
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java
index 4a08bc4e..11fa582b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java
@@ -14,12 +14,10 @@ import se.leap.bitmaskclient.databinding.FCircumventionSetupBinding;
public class CircumventionSetupFragment extends BaseSetupFragment {
- private CircumventionSetupFragment(int position) {
- super(position);
- }
-
public static CircumventionSetupFragment newInstance(int position) {
- return new CircumventionSetupFragment(position);
+ CircumventionSetupFragment fragment = new CircumventionSetupFragment();
+ fragment.setArguments(initBundle(position));
+ return fragment;
}
@Override