mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Fixed SettingsActivity crash
This commit is contained in:
parent
0a4be1e502
commit
6d4bc38ea6
1 changed files with 7 additions and 5 deletions
|
@ -142,11 +142,13 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
updatePreference(findPreference(key));
|
updatePreference(findPreference(key));
|
||||||
if (key.equals(getString(R.string.pref_key__intellihide_toolbars))) {
|
if(isAdded()) {
|
||||||
if (sharedPreferences.getBoolean(getString(R.string.pref_key__intellihide_toolbars), false)) {
|
if (key.equals(getString(R.string.pref_key__intellihide_toolbars))) {
|
||||||
((SettingsActivity) getActivity()).enableToolbarHiding();
|
if (sharedPreferences.getBoolean(getString(R.string.pref_key__intellihide_toolbars), false)) {
|
||||||
} else {
|
((SettingsActivity) getActivity()).enableToolbarHiding();
|
||||||
((SettingsActivity) getActivity()).disableToolbarHiding();
|
} else {
|
||||||
|
((SettingsActivity) getActivity()).disableToolbarHiding();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue