mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 20:57:25 +01:00
Don't reset disable nsfw forever option when resetting all settings.
This commit is contained in:
parent
270f891761
commit
e65944ceb0
@ -258,10 +258,15 @@ public class AdvancedPreferenceFragment extends PreferenceFragmentCompat {
|
||||
.setTitle(R.string.are_you_sure)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i)
|
||||
-> {
|
||||
boolean disableNsfwForever = mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_NSFW_FOREVER, false);
|
||||
mSharedPreferences.edit().clear().apply();
|
||||
mainActivityTabsSharedPreferences.edit().clear().apply();
|
||||
nsfwAndBlurringSharedPreferences.edit().clear().apply();
|
||||
|
||||
if (disableNsfwForever) {
|
||||
mSharedPreferences.edit().putBoolean(SharedPreferencesUtils.DISABLE_NSFW_FOREVER, true).apply();
|
||||
}
|
||||
|
||||
Toast.makeText(activity, R.string.reset_all_settings_success, Toast.LENGTH_SHORT).show();
|
||||
EventBus.getDefault().post(new RecreateActivityEvent());
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user