disable expert mode on auto upload light, also no custom folders

This commit is contained in:
tobiasKaminsky 2017-08-10 11:13:04 +02:00
parent f63efd0c3d
commit 185887bb42
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -338,18 +338,20 @@ public class Preferences extends PreferenceActivity
preferenceCategoryDetails.removePreference(mShowHiddenFiles);
}
mExpertMode = (SwitchPreference) findPreference("expert_mode");
mExpertMode.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = appPrefs.edit();
editor.putBoolean("expert_mode", mExpertMode.isChecked());
editor.apply();
return true;
}
});
if (!getResources().getBoolean(R.bool.syncedFolder_light)) {
mExpertMode = (SwitchPreference) findPreference("expert_mode");
mExpertMode.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = appPrefs.edit();
editor.putBoolean("expert_mode", mExpertMode.isChecked());
editor.apply();
return true;
}
});
}
PreferenceCategory preferenceCategoryMore = (PreferenceCategory) findPreference("more");
preferenceCategoryMore.setTitle(ThemeUtils.getColoredTitle(getString(R.string.prefs_category_more),