aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/Settings
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-09-27 08:58:57 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-09-27 08:58:57 +0000
commit47832e1e91db7e355b8122e1b533966c8df5ddba (patch)
tree069b08b46e6c43f18b017c957666c5ff9597e073 /app/src/main/java/Settings
parentedf85c2bc3d0a7d983b93d888e540380529601ca (diff)
downloadinfinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar.gz
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar.bz2
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar.lz
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar.xz
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.tar.zst
infinity-for-reddit-47832e1e91db7e355b8122e1b533966c8df5ddba.zip
Blurring spoiler post images is now available. Change spoiler and flair text background colors. Fixed collapsed comments shown after orientation change.
Diffstat (limited to 'app/src/main/java/Settings')
-rw-r--r--app/src/main/java/Settings/MainPreferenceFragment.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/src/main/java/Settings/MainPreferenceFragment.java b/app/src/main/java/Settings/MainPreferenceFragment.java
index af498294..8e3b7d99 100644
--- a/app/src/main/java/Settings/MainPreferenceFragment.java
+++ b/app/src/main/java/Settings/MainPreferenceFragment.java
@@ -17,6 +17,7 @@ import javax.inject.Inject;
import ml.docilealligator.infinityforreddit.ChangeNSFWBlurEvent;
import ml.docilealligator.infinityforreddit.ChangeNSFWEvent;
+import ml.docilealligator.infinityforreddit.ChangeSpoilerBlurEvent;
import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SharedPreferencesUtils;
@@ -44,6 +45,7 @@ public class MainPreferenceFragment extends PreferenceFragmentCompat {
SwitchPreference nsfwSwitch = findPreference(SharedPreferencesUtils.NSFW_KEY);
SwitchPreference blurNSFWSwitch = findPreference(SharedPreferencesUtils.BLUR_NSFW_KEY);
+ SwitchPreference blurSpoilerSwitch = findPreference(SharedPreferencesUtils.BLUR_SPOILER_KEY);
ListPreference themePreference = findPreference(SharedPreferencesUtils.THEME_KEY);
if(nsfwSwitch != null) {
@@ -71,6 +73,13 @@ public class MainPreferenceFragment extends PreferenceFragmentCompat {
});
}
+ if(blurSpoilerSwitch != null) {
+ blurSpoilerSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
+ EventBus.getDefault().post(new ChangeSpoilerBlurEvent((Boolean) newValue));
+ return true;
+ });
+ }
+
boolean systemDefault = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q;
if(themePreference != null) {