aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java
index 2f07f10b..f133863d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java
@@ -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());
})