Skip to content

Commit

Permalink
Fix an issue when settings activity had a wrong title
Browse files Browse the repository at this point in the history
  • Loading branch information
krlvm committed Oct 17, 2020
1 parent 66cc44c commit 093d55b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
setHasOptionsMenu(true);
updateTitle();

prefPackage = (ListPreference) this.findPreference(VPN_CONNECTION_MODE);
prefDisallow = (PreferenceScreen) findPreference(VPN_DISALLOWED_APPLICATION_LIST);
Expand Down Expand Up @@ -96,9 +97,14 @@ public void onAttach(Activity activity) {
@Override
public void onResume() {
super.onResume();
updateTitle();
updateVPNModeItem();
}

private void updateTitle() {
getActivity().setTitle(R.string.title_activity_settings);
}

private void updateVPNModeItem() {
updateVPNModeItem(!prefs.getBoolean("proxy_mode", false));
}
Expand Down

0 comments on commit 093d55b

Please sign in to comment.