diff --git a/Clover/app/src/main/java/org/floens/chan/core/model/PostLinkable.java b/Clover/app/src/main/java/org/floens/chan/core/model/PostLinkable.java
index ad91e966..5a7f6a05 100644
--- a/Clover/app/src/main/java/org/floens/chan/core/model/PostLinkable.java
+++ b/Clover/app/src/main/java/org/floens/chan/core/model/PostLinkable.java
@@ -22,6 +22,7 @@ import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;
+import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.ui.cell.PostCell;
import org.floens.chan.ui.theme.Theme;
@@ -41,7 +42,7 @@ public class PostLinkable extends ClickableSpan {
public final Object value;
public final Type type;
- private boolean spoilerVisible = false;
+ private boolean spoilerVisible = ChanSettings.revealTextSpoilers.get();
private int markedNo = -1;
public PostLinkable(Theme theme, Post post, String key, Object value, Type type) {
@@ -78,10 +79,12 @@ public class PostLinkable extends ClickableSpan {
ds.setUnderlineText(true);
} else if (type == Type.SPOILER) {
+ ds.bgColor = theme.spoilerColor;
+ ds.setUnderlineText(false);
if (!spoilerVisible) {
ds.setColor(theme.spoilerColor);
- ds.bgColor = theme.spoilerColor;
- ds.setUnderlineText(false);
+ } else {
+ ds.setColor(theme.textColorRevealSpoiler);
}
}
}
diff --git a/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java b/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java
index f5fad349..83f13a7e 100644
--- a/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java
+++ b/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java
@@ -118,6 +118,7 @@ public class ChanSettings {
public static final BooleanSetting anonymizeIds;
public static final BooleanSetting showAnonymousName;
public static final BooleanSetting revealImageSpoilers;
+ public static final BooleanSetting revealTextSpoilers;
public static final BooleanSetting repliesButtonsBottom;
public static final BooleanSetting confirmExit;
public static final BooleanSetting tapNoReply;
@@ -207,6 +208,7 @@ public class ChanSettings {
anonymizeIds = new BooleanSetting(p, "preference_anonymize_ids", false);
showAnonymousName = new BooleanSetting(p, "preference_show_anonymous_name", false);
revealImageSpoilers = new BooleanSetting(p, "preference_reveal_image_spoilers", false);
+ revealTextSpoilers = new BooleanSetting(p, "preference_reveal_text_spoilers", false);
repliesButtonsBottom = new BooleanSetting(p, "preference_buttons_bottom", false);
confirmExit = new BooleanSetting(p, "preference_confirm_exit", false);
tapNoReply = new BooleanSetting(p, "preference_tap_no_reply", false);
diff --git a/Clover/app/src/main/java/org/floens/chan/ui/controller/AdvancedSettingsController.java b/Clover/app/src/main/java/org/floens/chan/ui/controller/AdvancedSettingsController.java
index 1d37fd05..5611d6f1 100644
--- a/Clover/app/src/main/java/org/floens/chan/ui/controller/AdvancedSettingsController.java
+++ b/Clover/app/src/main/java/org/floens/chan/ui/controller/AdvancedSettingsController.java
@@ -124,6 +124,7 @@ public class AdvancedSettingsController extends SettingsController {
settings.add(new BooleanSettingView(this, ChanSettings.anonymizeIds, R.string.setting_anonymize_ids, 0));
settings.add(new BooleanSettingView(this, ChanSettings.showAnonymousName, R.string.setting_show_anonymous_name, 0));
settings.add(new BooleanSettingView(this, ChanSettings.revealImageSpoilers, R.string.settings_reveal_image_spoilers, 0));
+ settings.add(new BooleanSettingView(this, ChanSettings.revealTextSpoilers, R.string.settings_reveal_text_spoilers, R.string.settings_reveal_text_spoilers_description));
settings.add(new BooleanSettingView(this, ChanSettings.repliesButtonsBottom, R.string.setting_buttons_bottom, 0));
settings.add(new BooleanSettingView(this, ChanSettings.confirmExit, R.string.setting_confirm_exit, 0));
settings.add(new BooleanSettingView(this, ChanSettings.tapNoReply, R.string.setting_tap_no_rely, 0));
diff --git a/Clover/app/src/main/java/org/floens/chan/ui/theme/Theme.java b/Clover/app/src/main/java/org/floens/chan/ui/theme/Theme.java
index f825d6bc..c2d1d3cd 100644
--- a/Clover/app/src/main/java/org/floens/chan/ui/theme/Theme.java
+++ b/Clover/app/src/main/java/org/floens/chan/ui/theme/Theme.java
@@ -58,6 +58,7 @@ public class Theme {
public int highlightedColor;
public int savedReplyColor;
public int selectedColor;
+ public int textColorRevealSpoiler;
public ThemeDrawable settingsDrawable;
public ThemeDrawable imageDrawable;
@@ -120,7 +121,8 @@ public class Theme {
R.attr.post_selected_color,
R.attr.text_color_primary,
R.attr.text_color_secondary,
- R.attr.text_color_hint
+ R.attr.text_color_hint,
+ R.attr.text_color_reveal_spoiler
});
quoteColor = ta.getColor(0, 0);
@@ -140,6 +142,7 @@ public class Theme {
textPrimary = ta.getColor(14, 0);
textSecondary = ta.getColor(15, 0);
textHint = ta.getColor(16, 0);
+ textColorRevealSpoiler = ta.getColor(17, 0);
ta.recycle();
}
diff --git a/Clover/app/src/main/res/values/attrs.xml b/Clover/app/src/main/res/values/attrs.xml
index 8ccf790e..848f82ba 100644
--- a/Clover/app/src/main/res/values/attrs.xml
+++ b/Clover/app/src/main/res/values/attrs.xml
@@ -19,6 +19,7 @@ along with this program. If not, see .
+
diff --git a/Clover/app/src/main/res/values/strings.xml b/Clover/app/src/main/res/values/strings.xml
index ecffb8ee..679a7d66 100644
--- a/Clover/app/src/main/res/values/strings.xml
+++ b/Clover/app/src/main/res/values/strings.xml
@@ -411,6 +411,8 @@ along with this program. If not, see .
Hide IDs
Show Anonymous username
Reveal image spoilers
+ Reveal text spoilers
+ Makes the spoiler text appear clicked
Reply buttons on the bottom
Confirm before exit
Confirm exit
diff --git a/Clover/app/src/main/res/values/styles.xml b/Clover/app/src/main/res/values/styles.xml
index f384986d..3ffa230e 100644
--- a/Clover/app/src/main/res/values/styles.xml
+++ b/Clover/app/src/main/res/values/styles.xml
@@ -39,6 +39,7 @@ along with this program. If not, see .
- #DE000000
- #89000000
- #42000000
+ - #ffffffff
- #ff117743
- #ff0F0C5D