From b8f3fbd25f19498e7a6a9080369ff5815c18d6d7 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 26 Feb 2024 21:34:25 +0100 Subject: fix runtime exception on location switch --- .../se/leap/bitmaskclient/base/fragments/NavigationDrawerFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src') 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 16aea065..cbab1d32 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 @@ -439,7 +439,7 @@ public class NavigationDrawerFragment extends Fragment implements SharedPreferen @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if (key != null && key.equals(PREFERRED_CITY)) { - initManualGatewayEntry(); + getActivity().runOnUiThread(this::initManualGatewayEntry); } } -- cgit v1.2.3