Skip to content

Commit

Permalink
Merge pull request LucasGGamerM#414 from TheMemeSniper/fix-autoreveal-cw
Browse files Browse the repository at this point in the history
fix: make autoexpand content warning option also expand cws that start with "re:"
  • Loading branch information
LucasGGamerM authored May 26, 2024
2 parents d2704c1 + 2df6d9c commit 18ac042
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,13 @@ private void restoreStatusStates(List<Status> newData, Map<String, Status> oldDa
s.filterRevealed = oldStatus.filterRevealed;
}
if (GlobalUserPreferences.autoRevealEqualSpoilers != AutoRevealMode.NEVER &&
s.spoilerText != null &&
s.spoilerText.equals(mainStatus.spoilerText)) {
if (GlobalUserPreferences.autoRevealEqualSpoilers == AutoRevealMode.DISCUSSIONS || Objects.equals(mainStatus.account.id, s.account.id)) {
s.spoilerRevealed = mainStatus.spoilerRevealed;
s.spoilerText != null){
if (s.spoilerText.equals(mainStatus.spoilerText) ||
(s.spoilerText.toLowerCase().startsWith("re: ") &&
s.spoilerText.substring(4).equals(mainStatus.spoilerText))){
if (GlobalUserPreferences.autoRevealEqualSpoilers == AutoRevealMode.DISCUSSIONS || Objects.equals(mainStatus.account.id, s.account.id)) {
s.spoilerRevealed = mainStatus.spoilerRevealed;
}
}
}
}
Expand Down

0 comments on commit 18ac042

Please sign in to comment.