summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-06-23 16:35:38 +0200
committercyBerta <cyberta@riseup.net>2021-07-21 22:02:24 +0200
commit57915c157c880f29ac9577d1074bf2d54156231f (patch)
tree7191c38c959cb4497d89a2e7671a9ab7e77378a0 /app/src/main/java/se
parent7325a74661e943fc0f989ef5e230f0862cc8e9fb (diff)
automatically close navigation drawer after switch account item was selected
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java
index 5cae1591..f905a7d2 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java
@@ -289,8 +289,10 @@ public class NavigationDrawerFragment extends Fragment implements SharedPreferen
if (isDefaultBitmask()) {
IconTextEntry switchProvider = drawerView.findViewById(R.id.switch_provider);
switchProvider.setVisibility(VISIBLE);
- switchProvider.setOnClickListener(v ->
- getActivity().startActivityForResult(new Intent(getActivity(), ProviderListActivity.class), REQUEST_CODE_SWITCH_PROVIDER));
+ switchProvider.setOnClickListener(v -> {
+ closeDrawer();
+ getActivity().startActivityForResult(new Intent(getActivity(), ProviderListActivity.class), REQUEST_CODE_SWITCH_PROVIDER);
+ });
}
}